### Question:
Compiler { public Map<String, Object> getCompileResult(Submission submission, String workDirectory, String baseFileName) { String commandLine = getCompileCommandLine(submission, workDirectory, baseFileName); String compileLogPath = getCompileLogPath(workDirectory, baseFileName); return getCompileResult(commandLine, compileLogPath); }  Map<String, Object> getCompileResult(Submission submission, 
			String workDirectory, String baseFileName);  }### Answer:
@Test public void testGetCompileResultCppWithSuccess() throws Exception { String workDirectory = workBaseDirectory + "/voj-1000"; String baseFileName = "random-name"; Submission submission = submissionMapper.getSubmission(1000); preprocessor.createTestCode(submission, workDirectory, baseFileName); Map<String, Object> result = compiler.getCompileResult(submission, workDirectory, baseFileName); Assertions.assertEquals(true, result.get("isSuccessful")); }
@Test public void testGetCompileResultJavaWithSuccess() throws Exception { String workDirectory = workBaseDirectory + "/voj-1001"; String baseFileName = "RandomName"; Submission submission = submissionMapper.getSubmission(1001); preprocessor.createTestCode(submission, workDirectory, baseFileName); Map<String, Object> result = compiler.getCompileResult(submission, workDirectory, baseFileName); Assertions.assertEquals(true, result.get("isSuccessful")); }
@Test public void testGetCompileResultCppWithError() throws Exception { String workDirectory = workBaseDirectory + "/voj-1002"; String baseFileName = "random-name"; Submission submission = submissionMapper.getSubmission(1002); preprocessor.createTestCode(submission, workDirectory, baseFileName); Map<String, Object> result = compiler.getCompileResult(submission, workDirectory, baseFileName); Assertions.assertEquals(false, result.get("isSuccessful")); }