### Question:
MailBackendSyncData { public Collection<Email> getManagedEmails() { return managedEmails; } @VisibleForTesting  MailBackendSyncData(Date dataDeltaDate,
			MailboxPath mailboxPath,
			long currentUIDNext,
			Snapshot previousStateSnapshot,
			Collection<Email> managedEmails,
			Collection<Email> newManagedEmails,
			EmailChanges emailChanges); Date getDataDeltaDate(); MailboxPath getMailboxPath(); long getCurrentUIDNext(); Snapshot getPreviousStateSnapshot(); Collection<Email> getManagedEmails(); Collection<Email> getNewManagedEmails(); EmailChanges getEmailChanges();  }### Answer:
@Test public void testGetManagedEmailsIsEmptyForNull() { control.replay(); assertThat(testee.getManagedEmails(null)).isEmpty(); control.verify(); }
@Test public void testGetManagedEmailsAreTookFromSnapshot() { Snapshot snapshot = Snapshot.builder() .addEmail(Email.builder() .uid(5) .date(date("2004-12-14T22:00:00")) .read(false) .answered(false) .build()) .addEmail(Email.builder() .uid(15) .date(date("2014-12-14T22:00:00")) .read(true) .answered(true) .build()) .filterType(FilterType.ALL_ITEMS) .uidNext(5000) .build(); control.replay(); assertThat(testee.getManagedEmails(snapshot)).containsOnly( Email.builder() .uid(5) .date(date("2004-12-14T22:00:00")) .read(false) .answered(false) .build(), Email.builder() .uid(15) .date(date("2014-12-14T22:00:00")) .read(true) .answered(true) .build()); control.verify(); }