@Test
    public void shouldSortProperty() {
        final Property a = mock(Property.class);
        when(a.key()).thenReturn("Ant");
        final Property b = mock(Property.class);
        when(b.key()).thenReturn("Bat");
        final Property c = mock(Property.class);
        when(c.key()).thenReturn("Cat");

        final List<Property> l = Arrays.asList(c, b, a);
        l.sort(Comparators.PROPERTY_COMPARATOR);

        assertEquals(a.key(), l.get(0).key());
        assertEquals(b.key(), l.get(1).key());
        assertEquals(c.key(), l.get(2).key());
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/util/ComparatorsTest.java