### Question:
EmailViewPartsFetcherImpl implements EmailViewPartsFetcher { @VisibleForTesting Organizer addressToOrganizer(Address from) { if (from.isDefined()) { try { return new Organizer(from.asICSAttendee()); } catch (URISyntaxException e) { logger.error("Invalid From email syntax : " + from.getMail(), e); } } return null; } EmailViewPartsFetcherImpl(TransformersFactory transformersFactory, MailboxService mailboxService, 
			List<BodyPreference> bodyPreferences, UserDataRequest udr, MailboxPath path, CollectionId collectionId); @Override EmailView fetch(long uid, BodyPreferencePolicy bodyPreferencePolicy); @Override ICalendar fetchInvitation(long uid);  }### Answer:
@Test(expected=NullPointerException.class) public void testAddressToOrganizerWithNullFrom() { Address from = null; noDependencyTestee().addressToOrganizer(from); }
@Test public void testAddressToOrganizerWithNullEmail() { Address from = new Address(null); Organizer organizer = noDependencyTestee().addressToOrganizer(from); assertThat(organizer).isNull(); }
@Test public void testAddressToOrganizerWithFrom() throws URISyntaxException { Address from = new Address("login@domain"); Organizer organizer = noDependencyTestee().addressToOrganizer(from); assertThat(organizer).isEqualTo(new Organizer("MAILTO:login@domain")); }
@Test public void testAddressToOrganizerWithBadFromSyntax() throws URISyntaxException { Address from = new Address("login@@domain"); Organizer organizer = noDependencyTestee().addressToOrganizer(from); assertThat(organizer).isEqualTo(new Organizer("MAILTO:login@@domain")); }