@Test(expected = KieMemoryCompilerException.class)
public void invalidClass() {

    Map<String, String> source = singletonMap("org.kie.memorycompiler.InvalidJavaClass", "Invalid Java Code");
    KieMemoryCompiler.compile(source, this.getClass().getClassLoader());
}