@Test
public void parseIdentityFile() throws Exception {

	InputStream idInputStream = TlvParserTest.class.getResourceAsStream("/id-alice.tlv");
	byte[] idFile = IOUtils.toByteArray(idInputStream);
	Identity identity = TlvParser.parse(idFile, Identity.class);
	assertNotNull(identity);
	LOG.debug("name: " + identity.name);
	assertEquals("SPECIMEN", identity.name);
	LOG.debug("first name: " + identity.firstName);
	assertEquals("Alice Geldigekaart2266", identity.firstName);
	LOG.debug("card number: " + identity.cardNumber);
	assertEquals("000000226635", identity.cardNumber);
	LOG.debug("card validity date begin: " + identity.cardValidityDateBegin.getTime());
	assertEquals(new GregorianCalendar(2005, 7, 8), identity.cardValidityDateBegin);
	LOG.debug("card validity date end: " + identity.cardValidityDateEnd.getTime());
	assertEquals(new GregorianCalendar(2010, 7, 8), identity.cardValidityDateEnd);
	LOG.debug("Card Delivery Municipality: " + identity.cardDeliveryMunicipality);
	assertEquals("Certipost Specimen", identity.cardDeliveryMunicipality);
	LOG.debug("national number: " + identity.nationalNumber);
	assertEquals("71715100070", identity.nationalNumber);
	LOG.debug("middle name: " + identity.middleName);
	assertEquals("A", identity.middleName);
	LOG.debug("nationality: " + identity.nationality);
	assertEquals("Belg", identity.nationality);
	LOG.debug("place of birth: " + identity.placeOfBirth);
	assertEquals("Hamont-Achel", identity.placeOfBirth);
	LOG.debug("gender: " + identity.gender);
	Assert.assertEquals(Gender.FEMALE, identity.gender);
	assertNotNull(identity.dateOfBirth);
	LOG.debug("date of birth: " + identity.dateOfBirth.getTime());
	assertEquals(new GregorianCalendar(1971, 0, 1), identity.dateOfBirth);
	LOG.debug("special status: " + identity.specialStatus);
	Assert.assertEquals(SpecialStatus.NO_STATUS, identity.specialStatus);
	assertNull(identity.getSpecialOrganisation());
	assertNotNull(identity.getData());
}