ConfigurationEntryRestController extends HerdBaseController { @RequestMapping(value = CONFIGURATION_ENTRIES_URI_PREFIX + "/{configurationEntryKey}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_CONFIGURATION_ENTRIES_GET) public ConfigurationEntry getConfigurationEntry(@PathVariable("configurationEntryKey") String configurationEntryKey) { return configurationEntryService.getConfigurationEntry(configurationEntryKey); }  @RequestMapping(value = CONFIGURATION_ENTRIES_URI_PREFIX + "/{configurationEntryKey}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_CONFIGURATION_ENTRIES_GET) ConfigurationEntry getConfigurationEntry(@PathVariable("configurationEntryKey") String configurationEntryKey); @RequestMapping(value = CONFIGURATION_ENTRIES_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_CONFIGURATION_ENTRIES_ALL_GET) ConfigurationEntryKeys getConfigurationEntries(); static final String CONFIGURATION_ENTRIES_URI_PREFIX; }
@Test public void testGetConfigurationEntry() { String configurationEntryKey = "KEY"; String configurationEntryValue = "VALUE"; String configurationEntryValueClob = "VALUE CLOB"; ConfigurationEntry configurationEntry = new ConfigurationEntry(configurationEntryKey, configurationEntryValue, configurationEntryValueClob); when(configurationEntryService.getConfigurationEntry(configurationEntryKey)).thenReturn(configurationEntry); ConfigurationEntry response = configurationEntryRestController.getConfigurationEntry(configurationEntryKey); verify(configurationEntryService).getConfigurationEntry(configurationEntryKey); assertEquals("Response not equal to expected configuration entry response.", configurationEntry, response); }