### Question:
LessCompiler { public String compile(URL sourceURL) throws UnableToCompleteException { LessCompilerContext context = new LessCompilerContext(logger, sourceURL.getFile()); try { Function<LessCompilerContext, String> compiler = LessCompiler.newCompiler(); return compiler.apply(context); } catch (Exception e) { logger.log(TreeLogger.Type.ERROR, "Error compiling LESS: " + e.getMessage(), e); throw new UnableToCompleteException(); } } LessCompiler(TreeLogger parentLogger); @SuppressWarnings("unchecked") static Function<LessCompilerContext, String> newCompiler(); String compile(URL sourceURL);  }### Answer:
@Test public void test() throws UnableToCompleteException { compile("test.less"); }
@Test public void withImports() throws UnableToCompleteException { String output = compile("nested-imports.less"); assertThat(output, not(equalTo("undefined"))); }
@Test(expected = Exception.class) public void compileError() throws UnableToCompleteException { String output = compile("invalid.less"); }