@Override
    protected int compareFirst(final Path p1, final Path p2) {
        if(StringUtils.isBlank(p1.attributes().getGroup()) && StringUtils.isBlank(p2.attributes().getGroup())) {
            return 0;
        }
        if(StringUtils.isBlank(p1.attributes().getGroup())) {
            return -1;
        }
        if(StringUtils.isBlank(p2.attributes().getGroup())) {
            return 1;
        }
        if(ascending) {
            return p1.attributes().getGroup().compareToIgnoreCase(p2.attributes().getGroup());
        }
        return -p1.attributes().getGroup().compareToIgnoreCase(p2.attributes().getGroup());
    }
@Test
    public void testCompareFirst() {
        assertEquals(0,
                new GroupComparator(true).compareFirst(new Path("/a", EnumSet.of(Path.Type.file)), new Path("/b", EnumSet.of(Path.Type.file))));
        final Path p = new Path("/a", EnumSet.of(Path.Type.file));
        p.attributes().setGroup("g");
        assertEquals(1,
                new GroupComparator(true).compareFirst(p, new Path("/b", EnumSet.of(Path.Type.file))));
        assertEquals(-1,
                new GroupComparator(true).compareFirst(new Path("/b", EnumSet.of(Path.Type.file)), p));
    }