Preferences { public boolean isFirstBackup() { for (DataType type : DataType.values()) { if (preferences.contains(type.maxSyncedPreference)) { return false; } } return true; } Preferences(Context context);  Preferences(Context context, SharedPreferences preferences); DataTypePreferences getDataTypePreferences(); boolean isAppLogEnabled(); boolean isAppLogDebug(); ContactGroup getBackupContactGroup(); boolean isCallLogCalendarSyncEnabled(); boolean isCallLogBackupAfterCallEnabled(); int getCallLogCalendarId(); CallLogTypes getCallLogType(); boolean isRestoreStarredOnly(); String getReferenceUid(); void setReferenceUid(String referenceUid); boolean getMailSubjectPrefix(); int getMaxItemsPerSync(); int getMaxItemsPerRestore(); boolean isWifiOnly(); boolean isAllow3rdPartyIntegration(); boolean isAutoBackupEnabled(); int getIncomingTimeoutSecs(); int getRegularTimeoutSecs(); MarkAsReadTypes getMarkAsReadType(); boolean getMarkAsReadOnRestore(); AddressStyle getEmailAddressStyle(); boolean isFirstBackup(); boolean isFirstUse(); void setSmsDefaultPackage(String smsPackage); String getSmsDefaultPackage(); boolean hasSeenSmsDefaultPackageChangeDialog(); void setSeenSmsDefaultPackageChangeDialog(); void reset(); boolean isNotificationEnabled(); boolean confirmAction(); boolean shouldShowAboutDialog(); boolean isUseOldScheduler(); void setUseOldScheduler(boolean enabled); @StyleRes int getAppTheme(); void migrate();  }
@Test public void shouldTestForFirstBackup() throws Exception { assertThat(preferences.isFirstBackup()).isTrue(); }