@Test public void shouldGetByKey() throws Exception { ConfigurationSetting actual = service.getByKey("KEY_NAME"); verify(repository).getByKey("KEY_NAME"); assertEquals(actual.getKey(), expected.getKey()); }
public ConfigurationSetting getByKey(String key) { return configurationSettingRepository.getByKey(key); }
ConfigurationSettingService { public ConfigurationSetting getByKey(String key) { return configurationSettingRepository.getByKey(key); } }
ConfigurationSettingService { public ConfigurationSetting getByKey(String key) { return configurationSettingRepository.getByKey(key); } @Autowired  ConfigurationSettingService(ConfigurationSettingRepository configurationSettingRepository); }
ConfigurationSettingService { public ConfigurationSetting getByKey(String key) { return configurationSettingRepository.getByKey(key); } @Autowired  ConfigurationSettingService(ConfigurationSettingRepository configurationSettingRepository); ConfigurationSetting getByKey(String key); int getConfigurationIntValue(String key); String getConfigurationStringValue(String key); Boolean getBoolValue(String key); List<Object> getConfigurationListValue(String key, String delimiter); List<ConfigurationSetting> getConfigurations(); void update(List<ConfigurationSetting> settings); void saveBooleanValue(String key, Boolean value); List<ConfigurationSetting> getSearchResults(String s); }
ConfigurationSettingService { public ConfigurationSetting getByKey(String key) { return configurationSettingRepository.getByKey(key); } @Autowired  ConfigurationSettingService(ConfigurationSettingRepository configurationSettingRepository); ConfigurationSetting getByKey(String key); int getConfigurationIntValue(String key); String getConfigurationStringValue(String key); Boolean getBoolValue(String key); List<Object> getConfigurationListValue(String key, String delimiter); List<ConfigurationSetting> getConfigurations(); void update(List<ConfigurationSetting> settings); void saveBooleanValue(String key, Boolean value); List<ConfigurationSetting> getSearchResults(String s);  }