@Test public void testCreate() { UserPreferencesFactory factory = UserPreferencesFactory.getInstance(); UserPreferences userPrefs = factory.create(); assertNotNull(userPrefs); assertEquals(UserPreferences.class, userPrefs.getClass()); }
public UserPreferences create() { return UserPreferences.getInstance(); }
UserPreferencesFactory { public UserPreferences create() { return UserPreferences.getInstance(); } }
UserPreferencesFactory { public UserPreferences create() { return UserPreferences.getInstance(); } private  UserPreferencesFactory(); }
UserPreferencesFactory { public UserPreferences create() { return UserPreferences.getInstance(); } private  UserPreferencesFactory(); static UserPreferencesFactory getInstance(); UserPreferences create(); }
UserPreferencesFactory { public UserPreferences create() { return UserPreferences.getInstance(); } private  UserPreferencesFactory(); static UserPreferencesFactory getInstance(); UserPreferences create();  }