@Test
public void testNewCompletionParser() throws Exception {
CommandLineParser<ParseCompleteTest1<CommandInvocation>> clp = new AeshCommandContainerBuilder<ParseCompleteTest1<CommandInvocation>, CommandInvocation>().create(new ParseCompleteTest1<>()).getParser();
clp.parse("test -e foo1", CommandLineParser.Mode.COMPLETION);
assertEquals("foo1", clp.getProcessedCommand().findOption("e").getValue());
assertTrue(clp.getProcessedCommand().findOption("e").isCursorValue());
assertEquals(CompleteStatus.Status.COMPLETE_OPTION, clp.getProcessedCommand().completeStatus().status());
clp.parse("test -e foo1 ", CommandLineParser.Mode.COMPLETION);
assertEquals("foo1", clp.getProcessedCommand().findOption("e").getValue());
assertFalse(clp.getProcessedCommand().findOption("e").isCursorValue());
assertEquals(CompleteStatus.Status.COMPLETE_OPTION, clp.getProcessedCommand().completeStatus().status());
clp.parse("test --X", CommandLineParser.Mode.COMPLETION);
assertTrue(clp.getProcessedCommand().findOption("e").hasValue());
}