@Test
public void testSortClasses() throws Exception {

    AnnotationFinder finder = new AnnotationFinder(new ClassesArchive(Emerald.class)).link();
    List<Annotated<Class<?>>> classes = finder.findMetaAnnotatedClasses(Resource.class);
    assertTrue(classes.size() >= 3);
    List<Annotated<Class<?>>> sorted = AnnotationDeployer.sortClasses(classes);
    assertTrue(sorted.size() >= 3);
    assertEquals(Emerald.class, sorted.get(0).get());
    assertEquals(Green.class, sorted.get(1).get());
    assertEquals(Color.class, sorted.get(2).get());
}