public SubmissionResult verify(Submission submission) {
        CompilationCheck compilation = compiler.checkCanCompile(submission.getAllCompilationUnits());
        if (compilation.passed()) {
            return compileWithTestsAndRun(submission);
        } else {
            return compilation.asSubmissionResult();
        }
    }