test_class.file: library/src/test/java/com/github/devnied/emvnfccard/utils/TrackUtilsTest.java
test_class.identifier: TrackUtilsTest
test_case.body: @Test
  	public void track2EquivalentTest2() {
  		EmvTrack2 track2 = TrackUtils.extractTrack2EquivalentData(BytesUtils.fromString("55 55 55 66 88 77 66 55 66 7D 11 05 62 01 69 28 07 65 90 00 0F"));
  
  		Assertions.assertThat(track2).isNotNull();
  		Assertions.assertThat(track2.getCardNumber()).isEqualTo("5555556688776655667");
  		SimpleDateFormat sdf = new SimpleDateFormat("MM/yyyy");
  		Assertions.assertThat(sdf.format(track2.getExpireDate())).isEqualTo("05/2011");
  		Assertions.assertThat(track2.getService()).isNotNull();
  		Assertions.assertThat(track2.getService().getServiceCode1()).isEqualTo(ServiceCode1Enum.NATIONAL_ICC);
  		Assertions.assertThat(track2.getService().getServiceCode2()).isEqualTo(ServiceCode2Enum.BY_ISSUER);
  		Assertions.assertThat(track2.getService().getServiceCode3()).isEqualTo(ServiceCode3Enum.NO_RESTRICTION_PIN_REQUIRED);
  	}
test_case.class_method_signature: TrackUtilsTest.track2EquivalentTest2()
test_case.full_signature: @Test public void track2EquivalentTest2()
test_case.identifier: track2EquivalentTest2
test_case.invocations: extractTrack2EquivalentData fromString isNotNull assertThat isEqualTo assertThat getCardNumber isEqualTo assertThat format getExpireDate isNotNull assertThat getService isEqualTo assertThat getServiceCode1 getService isEqualTo assertThat getServiceCode2 getService isEqualTo assertThat getServiceCode3 getService
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void track2EquivalentTest2()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(TrackUtils.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(TrackUtils.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: CARD_HOLDER_NAME_SEPARATOR = "/"
focal_class.modifier: public static final
focal_class.original_string: public static final String CARD_HOLDER_NAME_SEPARATOR = "/";
focal_class.type: String
focal_class.var_name: CARD_HOLDER_NAME_SEPARATOR
focal_class.declarator: TRACK2_EQUIVALENT_PATTERN = Pattern.compile("([0-9]{1,19})D([0-9]{4})([0-9]{3})?(.*)")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern TRACK2_EQUIVALENT_PATTERN = Pattern.compile("([0-9]{1,19})D([0-9]{4})([0-9]{3})?(.*)");
focal_class.type: Pattern
focal_class.var_name: TRACK2_EQUIVALENT_PATTERN
focal_class.declarator: TRACK1_PATTERN = Pattern
  			.compile("%?([A-Z])([0-9]{1,19})(\\?[0-9])?\\^([^\\^]{2,26})\\^([0-9]{4}|\\^)([0-9]{3}|\\^)([^\\?]+)\\??")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern TRACK1_PATTERN = Pattern
  			.compile("%?([A-Z])([0-9]{1,19})(\\?[0-9])?\\^([^\\^]{2,26})\\^([0-9]{4}|\\^)([0-9]{3}|\\^)([^\\?]+)\\??");
focal_class.type: Pattern
focal_class.var_name: TRACK1_PATTERN
focal_class.file: library/src/main/java/com/github/devnied/emvnfccard/utils/TrackUtils.java
focal_class.identifier: TrackUtils
focal_class.class_method_signature: TrackUtils.extractTrack2EquivalentData(final byte[] pRawTrack2)
focal_class.full_signature: public static EmvTrack2 extractTrack2EquivalentData(final byte[] pRawTrack2)
focal_class.identifier: extractTrack2EquivalentData
focal_class.modifiers: public static
focal_class.parameters: (final byte[] pRawTrack2)
focal_class.return: EmvTrack2
focal_class.signature: EmvTrack2 extractTrack2EquivalentData(final byte[] pRawTrack2)
focal_class.class_method_signature: TrackUtils.extractTrack1Data(final byte[] pRawTrack1)
focal_class.full_signature: public static EmvTrack1 extractTrack1Data(final byte[] pRawTrack1)
focal_class.identifier: extractTrack1Data
focal_class.modifiers: public static
focal_class.parameters: (final byte[] pRawTrack1)
focal_class.return: EmvTrack1
focal_class.signature: EmvTrack1 extractTrack1Data(final byte[] pRawTrack1)
focal_class.class_method_signature: TrackUtils.TrackUtils()
focal_class.full_signature: private  TrackUtils()
focal_class.identifier: TrackUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  TrackUtils()
focal_method.body: public static EmvTrack2 extractTrack2EquivalentData(final byte[] pRawTrack2) {
  		EmvTrack2 ret = null;
  
  		if (pRawTrack2 != null) {
  			EmvTrack2 track2 = new EmvTrack2();
  			track2.setRaw(pRawTrack2);
  			String data = BytesUtils.bytesToStringNoSpace(pRawTrack2);
  			Matcher m = TRACK2_EQUIVALENT_PATTERN.matcher(data);
  			// Check pattern
  			if (m.find()) {
  				// read card number
  				track2.setCardNumber(m.group(1));
  				// Read expire date
  				SimpleDateFormat sdf = new SimpleDateFormat("yyMM", Locale.getDefault());
  				try {
  					track2.setExpireDate(DateUtils.truncate(sdf.parse(m.group(2)), Calendar.MONTH));
  				} catch (ParseException e) {
  					LOGGER.error("Unparsable expire card date : {}", e.getMessage());
  					return ret;
  				}
  				// Read service
  				track2.setService(new Service(m.group(3)));
  				ret = track2;
  			}
  		}
  		return ret;
  	}
focal_method.class_method_signature: TrackUtils.extractTrack2EquivalentData(final byte[] pRawTrack2)
focal_method.full_signature: public static EmvTrack2 extractTrack2EquivalentData(final byte[] pRawTrack2)
focal_method.identifier: extractTrack2EquivalentData
focal_method.invocations: setRaw bytesToStringNoSpace matcher find setCardNumber group getDefault setExpireDate truncate parse group error getMessage setService group
focal_method.modifiers: public static
focal_method.parameters: (final byte[] pRawTrack2)
focal_method.return: EmvTrack2
focal_method.signature: EmvTrack2 extractTrack2EquivalentData(final byte[] pRawTrack2)