@Test
 public void directPhoneNumberIsMapped() {
   Employment employment =
       employmentBuilder
           .telephoneNumber(PhoneNumber.createPhoneNumber("0300-12345"))
           .telephoneNumber(PhoneNumber.createPhoneNumber("0340-67890"))
           .build();
   Person person = personBuilder.employment(employment).build();
   se.vgregion.kivtools.svc.sitemap.Person result = SitemapPersonMapper.map(person, unitCache);
   List<TelephoneNumber> telephone = result.getEmployment().get(0).getTelephone();
   assertEquals("direct phone number", 2, telephone.size());
   assertEquals("first label", "Direkttelefon", telephone.get(0).getLabel());
   assertEquals("first type", TelephoneType.FIXED, telephone.get(0).getType());
   assertEquals("first area code", "0300", telephone.get(0).getAreaCode());
   assertEquals("first telephone number", "123 45", telephone.get(0).getTelephoneNumber());
   assertEquals("second label", "Direkttelefon", telephone.get(1).getLabel());
   assertEquals("second type", TelephoneType.FIXED, telephone.get(1).getType());
   assertEquals("second area code", "0340", telephone.get(1).getAreaCode());
   assertEquals("second telephone number", "678 90", telephone.get(1).getTelephoneNumber());
 }
 @Test
 public void faxNumberIsMapped() {
   Employment employment =
       employmentBuilder.faxNumber(PhoneNumber.createPhoneNumber("0300-12345")).build();
   Person person = personBuilder.employment(employment).build();
   se.vgregion.kivtools.svc.sitemap.Person result = SitemapPersonMapper.map(person, unitCache);
   List<TelephoneNumber> telephone = result.getEmployment().get(0).getTelephone();
   assertEquals("fax number", 1, telephone.size());
   assertEquals("label", "Fax", telephone.get(0).getLabel());
   assertEquals("type", TelephoneType.FAX, telephone.get(0).getType());
   assertEquals("area code", "0300", telephone.get(0).getAreaCode());
   assertEquals("telephone number", "123 45", telephone.get(0).getTelephoneNumber());
 }
 @Test
 public void internalPagerNumberIsMapped() {
   Employment employment =
       this.employmentBuilder
           .internalPagerNumber(PhoneNumber.createPhoneNumber("0300-12345"))
           .build();
   Person person = this.personBuilder.employment(employment).build();
   se.vgregion.kivtools.svc.sitemap.Person result =
       SitemapPersonMapper.map(person, this.unitCache);
   List<TelephoneNumber> telephone = result.getEmployment().get(0).getTelephone();
   assertEquals("internal pager number", 1, telephone.size());
   assertEquals("label", "Personsökare", telephone.get(0).getLabel());
   assertEquals("type", TelephoneType.OTHER, telephone.get(0).getType());
   assertEquals("area code", "0300", telephone.get(0).getAreaCode());
   assertEquals("telephone number", "123 45", telephone.get(0).getTelephoneNumber());
 }
 @Test
 public void publicTelephoneNumberIsMapped() {
   Employment employment =
       this.employmentBuilder
           .publicTelephoneNumber(PhoneNumber.createPhoneNumber("0300-12345"))
           .build();
   Person person = this.personBuilder.employment(employment).build();
   se.vgregion.kivtools.svc.sitemap.Person result =
       SitemapPersonMapper.map(person, this.unitCache);
   List<TelephoneNumber> telephone = result.getEmployment().get(0).getTelephone();
   assertEquals("public telephone number", 1, telephone.size());
   assertEquals("first label", "Telefon", telephone.get(0).getLabel());
   assertEquals("first type", TelephoneType.FIXED, telephone.get(0).getType());
   assertEquals("first area code", "0300", telephone.get(0).getAreaCode());
   assertEquals("first telephone number", "123 45", telephone.get(0).getTelephoneNumber());
 }