@Test
public void highlightFlags() {

    final List<Option> options = new ArrayList<>();
    options.add(new Option("--assignee, -a=<String[]>", null));
    options.add(new Option("--body, -b=<String>", null));
    options.add(new Option("--body-formatter, -g=<String>", null));
    options.add(new Option("--assign", null));
    options.add(new Option("--file, -f=<File>", null));
    options.add(new Option("--a", null));
    final Highlight highlight = new Highlight(options);
    /*
     * Can we support no leading or trailing characters?
     */
    assertEquals("\u001B[0m\u001B[1m--assignee\u001B[0m", highlight.matches("--assignee"));
    /*
     * Are we smart enough to avoid partial matches
     */
    assertEquals("the flags --ab and --body-wash are not valid", highlight.matches("the flags --ab and --body-wash are not valid"));
    /*
     * We can highlight the short versions with precision
     */
    assertEquals("the flags " +
                    "\u001B[0m\u001B[1m-a\u001B[0m and " +
                    "\u001B[0m\u001B[1m-b\u001B[0m are " +
                    "valid but -file and --body-double are not",
            highlight.matches("the flags -a and -b are valid but -file and --body-double are not"));
    /*
     * More complete example
     */
    assertEquals("foo \u001B[0m\u001B[1m--assignee\u001B[0m" +
                    " bar baz \u001B[0m\u001B[1m--a\u001B[0m" +
                    " and \u001B[0m\u001B[1m--file\u001B[0m" +
                    " with a \u001B[0m\u001B[1m--body\u001B[0m" +
                    " and \u001B[0m\u001B[1m--body-formatter\u001B[0m" +
                    " and --body-nothing and \u001B[0m\u001B[1m--a\u001B[0m",
            highlight.matches("foo --assignee bar baz --a and " +
                    "--file with a --body and --body-formatter and --body-nothing and --a"));
}