@Test public void shouldReturnFilesInConfigLocation() throws IOException { ConfigLocation configLocation = mock(ConfigLocation.class); File file = mock(File.class); List<File> files = Arrays.asList(file); when(configLocation.getExistingConfigFiles()).thenReturn(files); when(coreConfigurationService.getConfigLocation()).thenReturn(configLocation); List<File> existingConfigs = configLoader.findExistingConfigs(); assertSame(files, existingConfigs); }
public List<File> findExistingConfigs() throws IOException { final ConfigLocation currentConfigLocation = coreConfigurationService.getConfigLocation(); return currentConfigLocation.getExistingConfigFiles(); }
ConfigLoader { public List<File> findExistingConfigs() throws IOException { final ConfigLocation currentConfigLocation = coreConfigurationService.getConfigLocation(); return currentConfigLocation.getExistingConfigFiles(); } }
ConfigLoader { public List<File> findExistingConfigs() throws IOException { final ConfigLocation currentConfigLocation = coreConfigurationService.getConfigLocation(); return currentConfigLocation.getExistingConfigFiles(); }  }
ConfigLoader { public List<File> findExistingConfigs() throws IOException { final ConfigLocation currentConfigLocation = coreConfigurationService.getConfigLocation(); return currentConfigLocation.getExistingConfigFiles(); }  SettingsRecord loadMotechSettings(); List<File> findExistingConfigs(); SettingsRecord loadDefaultConfig(); @Autowired void setResourceLoader(ResourceLoader resourceLoader); @Autowired void setCoreConfigurationService(CoreConfigurationService coreConfigurationService); }
ConfigLoader { public List<File> findExistingConfigs() throws IOException { final ConfigLocation currentConfigLocation = coreConfigurationService.getConfigLocation(); return currentConfigLocation.getExistingConfigFiles(); }  SettingsRecord loadMotechSettings(); List<File> findExistingConfigs(); SettingsRecord loadDefaultConfig(); @Autowired void setResourceLoader(ResourceLoader resourceLoader); @Autowired void setCoreConfigurationService(CoreConfigurationService coreConfigurationService);  }