//
CommandDescriptor<Instance<A>> desc = CommandFactory.DEFAULT.create(A.class);
CompletionMatcher<Instance<A>> matcher = desc.completer();
//
assertEquals(new CompletionMatch(Delimiter.EMPTY, Completion.create("-", "a", true)), matcher.match("-"));
assertEquals(new CompletionMatch(Delimiter.EMPTY, Completion.create("", true)), matcher.match("-a"));
CompletionMatch a = new CompletionMatch(Delimiter.EMPTY, Completion.builder("--").add("add", true).add("addition", true).build());
CompletionMatch b = new CompletionMatch(Delimiter.EMPTY, Completion.builder("--ad").add("d", true).add("dition", true).build());
CompletionMatch c = new CompletionMatch(Delimiter.EMPTY, Completion.create("--addi", "tion", true));
//
assertEquals(a, matcher.match("--"));
assertEquals(b, matcher.match("--ad"));
assertEquals(c, matcher.match("--addi"));