ClassTypeExtractor { public Iterable<Class<?>> interfaces() { return interfaces; } ClassTypeExtractor(final Class<?> rootType); Iterable<Class<?>> allClasses(); Iterable<Class<?>> interfaces(); Iterable<Class<?>> allClassesAndInterfaces();  }
@Test public void interfaces_ConcreteMessage_returnsMarkerInterface() { ClassTypeExtractor sut = new ClassTypeExtractor(ConcreteMessage.class); Iterable<Class<?>> interfaces = sut.interfaces(); assertThat("Expected interface of message class.", interfaces, hasItem(MarkerInterface.class)); }
@Test public void interfaces_ArrayList_returnsSuperInterfacesOfImplementedInterfaces() { ClassTypeExtractor sut = new ClassTypeExtractor(ArrayList.class); Iterable<Class<?>> interfaces = sut.interfaces(); assertThat("Expected iterable base interface.", interfaces, hasItem(Iterable.class)); }