### Question:
AlgorithmExecution { protected static AlgorithmExecutor buildExecutor(ExecutionSetting executionSetting, List<ColumnIdentifier> acceptedColumns) throws FileNotFoundException, UnsupportedEncodingException { FileGenerator fileGenerator = new TempFileGenerator(); String identifier = executionSetting.getExecutionIdentifier(); ResultReceiver resultReceiver; if (executionSetting.getCacheResults()) { resultReceiver = new ResultCache(identifier, acceptedColumns); } else if (executionSetting.getCountResults()) { resultReceiver = new ResultCounter(identifier); } else { resultReceiver = new ResultPrinter(identifier, acceptedColumns); } AlgorithmExecutor executor = new AlgorithmExecutor(resultReceiver, fileGenerator); executor.setResultPathPrefix(resultReceiver.getOutputFilePathPrefix()); return executor; }  static List<ConfigurationValue> parseConfigurationValues(List<String> parameterValuesJson); static List<Input> parseInputs(List<String> inputsJson); static void main(String args[]);  }### Answer:
@Test public void testBuildExecutor() throws Exception { String expectedIdentifier = "myIdentifier"; ExecutionSetting setting = new ExecutionSetting(null, null, expectedIdentifier); setting.setCountResults(true); AlgorithmExecutor executor = AlgorithmExecution.buildExecutor(setting, null); CloseableOmniscientResultReceiver receiver = executor.resultReceiver; assertTrue(receiver instanceof ResultCounter); ResultCounter resultCounter = (ResultCounter) receiver; assertTrue(resultCounter.getOutputFilePathPrefix().contains(expectedIdentifier)); }