ConfigurationPasswordChecker { public boolean isPasswordSet() { return configurationRegistry.getString(updateConfigPasswordKey) != null; } ConfigurationPasswordChecker(ConfigurationRegistry configurationRegistry, String updateConfigPasswordKey); boolean isPasswordCorrect(String password); void assertPasswordCorrect(String password); boolean isPasswordSet();  }
@Test public void testIsPasswordSetTrue() throws Exception { ConfigurationRegistry configuration = ConfigurationRegistry.builder().build(); configuration.addConfigurationSource(SimpleSource.forTest(passwordKey, "")); assertTrue(new ConfigurationPasswordChecker(configuration, passwordKey).isPasswordSet()); }
@Test public void testIsPasswordSetFalse() throws Exception { ConfigurationRegistry configuration = ConfigurationRegistry.builder().build(); assertFalse(new ConfigurationPasswordChecker(configuration, passwordKey).isPasswordSet()); }