static JavaClasses of(Iterable<JavaClass> classes) {
        Map<String, JavaClass> mapping = new HashMap<>();
        for (JavaClass clazz : classes) {
            mapping.put(clazz.getName(), clazz);
        }
        JavaPackage defaultPackage = !Iterables.isEmpty(classes)
                ? getRoot(classes.iterator().next().getPackage())
                : JavaPackage.from(classes);
        return new JavaClasses(defaultPackage, mapping);
    }
@Test
    public void javaClasses_of_iterable() {
        ImmutableSet<JavaClass> iterable = ImmutableSet.of(importClassWithContext(JavaClassesTest.class), importClassWithContext(JavaClass.class));
        JavaClasses classes = JavaClasses.of(iterable);

        assertThat(ImmutableSet.copyOf(classes)).isEqualTo(iterable);
    }