@Test
public void excluded() throws Exception {

    Result pr = ShellCommandParser.parse("shell");
    assertEquals(0, pr.getRemainingArgs().length);
    assertEquals(ShellCommand.class, pr.getFirstCommand());
    List<Class<? extends Command>> excluded = new ArrayList<>();
    excluded.add(ShellCommand.class);
    pr = ShellCommandParser.parse("bibliography", excluded);
    assertEquals(0, pr.getRemainingArgs().length);
    assertEquals(BibliographyCommand.class, pr.getFirstCommand());
    pr = ShellCommandParser.parse("shell", excluded);
    assertEquals(1, pr.getRemainingArgs().length);
    assertEquals("shell", pr.getRemainingArgs()[0]);
    assertNull(pr.getFirstCommand());
    assertNull(pr.getLastCommand());
}