### Question:
ConfigurationDetecter { static int execute(File path, ClassLoader classLoader) { assert path != null; assert classLoader != null; try { File conf = detectConfigurationDirectory(classLoader); write(conf, path); } catch (Exception e) { e.printStackTrace(System.err); return 1; } return 0; } private  ConfigurationDetecter(); static void main(String[] args); static File read(File path);  }### Answer:
@Test public void execute() throws Exception { File marker = folder.newFile(ConfigurationDetecter.MARKER_FILE_NAME); File output = folder.newFile(); Assume.assumeTrue(output.delete() || output.exists() == false); assertThat(ConfigurationDetecter.execute(output, testLoader), is(0)); File result = ConfigurationDetecter.read(output); assertThat(result.getCanonicalPath(), is(marker.getParentFile().getCanonicalPath())); }
@Test public void execute_no_conf() throws Exception { File output = folder.newFile(); Assume.assumeTrue(output.delete() || output.exists() == false); assertThat(ConfigurationDetecter.execute(output, testLoader), is(not(0))); }