### Question:
ExitCommandInterpreter implements CommandInterpreter { @Override public void printHelp(final String commandName, final Interpreter interpreter) { interpreter.printNormal("Usage: @" + commandName + " .\n"); } ExitCommandInterpreter(final Shell shell); @Override void printHelp(final String commandName, final Interpreter interpreter); @Override String getSynopsis(); @Override void run(final Command command, final org.semanticweb.rulewerk.commands.Interpreter interpreter); static final Command EXIT_COMMAND; }### Answer:
@Test public void help_succeeds() throws ParsingException, CommandExecutionException { final Shell shellMock = Mockito.mock(Shell.class); final ExitCommandInterpreter commandInterpreter = new ExitCommandInterpreter(shellMock); final StringWriter writer = new StringWriter(); final Interpreter interpreter = ShellTestUtils.getMockInterpreter(writer); final Interpreter interpreterSpy = Mockito.spy(interpreter); commandInterpreter.printHelp("commandname", interpreterSpy); Mockito.verify(interpreterSpy).printNormal("Usage: @commandname .\n"); final String result = writer.toString(); assertEquals("Usage: @commandname .\n", result); }