@Test public void shouldRegisterComponentUsingAllPossibleSupertypes() { abstractRegistry.deepRegister(ArrayListSubclass.class); verify(registry).register(ArrayListSubclass.class, ArrayListSubclass.class); verify(registry).register(ArrayList.class, ArrayListSubclass.class); verify(registry).register(List.class, ArrayListSubclass.class); verify(registry).register(Collection.class, ArrayListSubclass.class); verify(registry).register(Iterable.class, ArrayListSubclass.class); verify(registry).register(Cloneable.class, ArrayListSubclass.class); verify(registry).register(Serializable.class, ArrayListSubclass.class); verify(registry).register(RandomAccess.class, ArrayListSubclass.class); verify(registry).register(AbstractList.class, ArrayListSubclass.class); verify(registry).register(AbstractCollection.class, ArrayListSubclass.class); }
public final void deepRegister(Class<?> componentType) { deepRegister(componentType, componentType, new HashSet<Class<?>>()); }
AbstractComponentRegistry implements ComponentRegistry { public final void deepRegister(Class<?> componentType) { deepRegister(componentType, componentType, new HashSet<Class<?>>()); } }
AbstractComponentRegistry implements ComponentRegistry { public final void deepRegister(Class<?> componentType) { deepRegister(componentType, componentType, new HashSet<Class<?>>()); }  }
AbstractComponentRegistry implements ComponentRegistry { public final void deepRegister(Class<?> componentType) { deepRegister(componentType, componentType, new HashSet<Class<?>>()); }  final void deepRegister(Class<?> componentType); }
AbstractComponentRegistry implements ComponentRegistry { public final void deepRegister(Class<?> componentType) { deepRegister(componentType, componentType, new HashSet<Class<?>>()); }  final void deepRegister(Class<?> componentType);  }