public void testGetLastSuccessfulSyncDate_Out()
{
Date outDate = new Date(1);
Date inDate = new Date(2);
ServicePreferences prefs = new ServicePreferences();
prefs.setEmail("1");
prefs.setPassword("2");
prefs.setLastSyncOutDate(outDate);
prefs.setLastSyncOutStatus(ServicePreferences.SYNC_STATUS_SUCCESS);
assertTrue(outDate == DatabaseRecoverer.getLastSuccessfulSyncDate(prefs));
prefs.setLastSyncInDate(inDate);
assertTrue(outDate == DatabaseRecoverer.getLastSuccessfulSyncDate(prefs));
prefs.setLastSyncInDate(null);
prefs.setLastSyncInStatus(ServicePreferences.SYNC_STATUS_SUCCESS);
assertTrue(outDate == DatabaseRecoverer.getLastSuccessfulSyncDate(prefs));
}