@Test public void discover_shouldSkipClassesThatDontImplementComponentRegistrarInterface() { when(retriever.retrieve(context)) .thenReturn(Collections.singletonList(InvalidRegistrar.class.getName())); assertThat(discovery.discover()).isEmpty(); }
public List<ComponentRegistrar> discover() { return instantiate(retriever.retrieve(context)); }
ComponentDiscovery { public List<ComponentRegistrar> discover() { return instantiate(retriever.retrieve(context)); } }
ComponentDiscovery { public List<ComponentRegistrar> discover() { return instantiate(retriever.retrieve(context)); } @VisibleForTesting  ComponentDiscovery(T context, RegistrarNameRetriever<T> retriever); }
ComponentDiscovery { public List<ComponentRegistrar> discover() { return instantiate(retriever.retrieve(context)); } @VisibleForTesting  ComponentDiscovery(T context, RegistrarNameRetriever<T> retriever); static ComponentDiscovery<Context> forContext(
      Context context, Class<? extends Service> discoveryService); List<ComponentRegistrar> discover(); }
ComponentDiscovery { public List<ComponentRegistrar> discover() { return instantiate(retriever.retrieve(context)); } @VisibleForTesting  ComponentDiscovery(T context, RegistrarNameRetriever<T> retriever); static ComponentDiscovery<Context> forContext(
      Context context, Class<? extends Service> discoveryService); List<ComponentRegistrar> discover();  }