MacroFactory implements Lifecycle { public String getGroovyMacroCode(String name) throws IOException { return groovyMacroScanner.getMacroCode(name); }  @Override void start(); @Override void stop(); @Override boolean isRunning(); IMacro get(String macroName); Set<IMacroDescriptor> getDescriptors(); List<String> listGroovyMacros(); String getGroovyMacroCode(String name); List<CompilationMessage> verifyGroovyMacro(String code); void saveGroovyMacro(String name, String code); void deleteGroovyMacro(String name); Object getData(String macroName, String request, Map<String, String[]> parameterMap, Authentication authentication);  }
@Test public void getGroovyMacroCode() throws IOException { when(groovyMacroScanner.getMacroCode(GROOVY_MACRO)).thenReturn("code"); assertEquals("code", macroFactory.getGroovyMacroCode(GROOVY_MACRO)); }