### Question:
PreferencesProvider { public synchronized boolean isAuthenticationFailed() { updateAppVersion(); return preferences.getBoolean(KEY_AUTHENTICATION_FAILED_FLAG, false); } private  PreferencesProvider(@NonNull final Context context); @SuppressWarnings("PMD.NonThreadSafeSingleton") @NonNull static PreferencesProvider getInstance(@NonNull final Context context); @Nullable synchronized String getRegistrationId(); synchronized void saveRegistrationId(@Nullable final String registrationId); synchronized boolean isAuthenticationFailed(); synchronized void saveAuthenticationFailedFlag(); synchronized void removeAuthenticationFailedFlag(); synchronized void reset(); static final int NO_SAVED_APP_VERSION; }### Answer:
@Test public void testIsAuthenticationFailed() { assertFalse(preferencesProvider.isAuthenticationFailed()); preferencesProvider.saveAuthenticationFailedFlag(); assertTrue(preferencesProvider.isAuthenticationFailed()); preferencesProvider.removeAuthenticationFailedFlag(); assertFalse(preferencesProvider.isAuthenticationFailed()); }