@Test public void when_adminPassHasNullValue_should_getAdminPasswordReturnNull() { AdminSharedPreferences adminSharedPreferences = mock(AdminSharedPreferences.class); when(adminSharedPreferences.get(KEY_ADMIN_PW)).thenReturn(null); AdminPasswordProvider adminPasswordProvider = new AdminPasswordProvider(adminSharedPreferences); assertThat(adminPasswordProvider.getAdminPassword(), is(nullValue())); }
public String getAdminPassword() { return (String) adminSharedPreferences.get(KEY_ADMIN_PW); }
AdminPasswordProvider { public String getAdminPassword() { return (String) adminSharedPreferences.get(KEY_ADMIN_PW); } }
AdminPasswordProvider { public String getAdminPassword() { return (String) adminSharedPreferences.get(KEY_ADMIN_PW); } AdminPasswordProvider(AdminSharedPreferences adminSharedPreferences); }
AdminPasswordProvider { public String getAdminPassword() { return (String) adminSharedPreferences.get(KEY_ADMIN_PW); } AdminPasswordProvider(AdminSharedPreferences adminSharedPreferences); boolean isAdminPasswordSet(); String getAdminPassword(); }
AdminPasswordProvider { public String getAdminPassword() { return (String) adminSharedPreferences.get(KEY_ADMIN_PW); } AdminPasswordProvider(AdminSharedPreferences adminSharedPreferences); boolean isAdminPasswordSet(); String getAdminPassword();  }