public static <T> Iterable<T> loadServicesOrdered(Class<T> iface, ClassLoader classLoader) {
    ServiceLoader<T> loader = ServiceLoader.load(iface, classLoader);
    ImmutableSortedSet.Builder<T> builder =
        new ImmutableSortedSet.Builder<>(ObjectsClassComparator.INSTANCE);
    builder.addAll(loader);
    return builder.build();
  }
@Test
  public void testLoadServicesOrderedReordersClassesByName() {
    List<String> names = new ArrayList<>();
    for (FakeService service : ReflectHelpers.loadServicesOrdered(FakeService.class)) {
      names.add(service.getName());
    }

    assertThat(names, contains("Alpha", "Zeta"));
  }