### Question:
DefaultConfigurator implements Configuration<Map<String, Object>> { @Override public void configure(final Configurable configurable) { currentState.configure(configurable); }  @Override void configure(final Configurable configurable); @SuppressWarnings("unchecked") @Override T getParameter(final String name, final T defaultValue); static final String CONFIGURATION_FILE_SYSTEM_PROPERTY; static final String ETC_DIR_SYSTEM_PROPERTY; static final String CONFIGURATION_FILENAME; static final String DEFAULT_CONFIGURATION_FILE_NAME; }### Answer:
@Test public void strategyOneSucceeds() throws Exception { final File configurationFile = File.createTempFile(randomString(), ".yaml"); final Map<String, Object> configuration = createSampleConfiguration(configurationFile); System.setProperty( DefaultConfigurator.CONFIGURATION_FILE_SYSTEM_PROPERTY, configurationFile.getAbsolutePath()); cut.configure(dummyTarget); assertSame(cut.configurationHasBeenLoaded, cut.currentState); checkConfiguration(configuration, cut.parameters); }
@Test public void strategyTwoSucceeds() throws Exception { final File tmpConfigurationFile = File.createTempFile(randomString(), ".yaml"); final File configurationFile = new File(tmpConfigurationFile.getParent(), DefaultConfigurator.CONFIGURATION_FILENAME); configurationFile.renameTo(configurationFile); final Map<String, Object> configuration = createSampleConfiguration(configurationFile); System.clearProperty(DefaultConfigurator.CONFIGURATION_FILE_SYSTEM_PROPERTY); System.setProperty( DefaultConfigurator.ETC_DIR_SYSTEM_PROPERTY, configurationFile.getParentFile().getAbsolutePath()); cut.configure(dummyTarget); assertSame(cut.configurationHasBeenLoaded, cut.currentState); checkConfiguration(configuration, cut.parameters); }