@Test
    public void shouldSortVertex() {
        final Vertex a = mock(Vertex.class);
        when(a.id()).thenReturn("Ant");
        final Vertex b = mock(Vertex.class);
        when(b.id()).thenReturn("Bat");
        final Vertex c = mock(Vertex.class);
        when(c.id()).thenReturn("Cat");

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

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