@Test public void testGetProviderHandlerMissing() { ProviderTypeKey providerTypeKey = mock(ProviderTypeKey.class); assertNull(handlerRegistry.getProviderHandler(providerTypeKey)); }
public T getProviderHandler(ProviderTypeKey providerTypeKey) { return handlers.stream() .filter(handler -> handler.acceptProviderType(providerTypeKey)) .sorted(Comparator.comparingInt(ProviderHandler::getPriority)) .findFirst().orElse(null); }
AbstractProviderHandlerRegistry { public T getProviderHandler(ProviderTypeKey providerTypeKey) { return handlers.stream() .filter(handler -> handler.acceptProviderType(providerTypeKey)) .sorted(Comparator.comparingInt(ProviderHandler::getPriority)) .findFirst().orElse(null); } }
AbstractProviderHandlerRegistry { public T getProviderHandler(ProviderTypeKey providerTypeKey) { return handlers.stream() .filter(handler -> handler.acceptProviderType(providerTypeKey)) .sorted(Comparator.comparingInt(ProviderHandler::getPriority)) .findFirst().orElse(null); } protected  AbstractProviderHandlerRegistry(); protected  AbstractProviderHandlerRegistry(final Instance<T> handlerInstance); }
AbstractProviderHandlerRegistry { public T getProviderHandler(ProviderTypeKey providerTypeKey) { return handlers.stream() .filter(handler -> handler.acceptProviderType(providerTypeKey)) .sorted(Comparator.comparingInt(ProviderHandler::getPriority)) .findFirst().orElse(null); } protected  AbstractProviderHandlerRegistry(); protected  AbstractProviderHandlerRegistry(final Instance<T> handlerInstance); boolean isProviderInstalled(ProviderTypeKey providerTypeKey); T getProviderHandler(ProviderTypeKey providerTypeKey); }
AbstractProviderHandlerRegistry { public T getProviderHandler(ProviderTypeKey providerTypeKey) { return handlers.stream() .filter(handler -> handler.acceptProviderType(providerTypeKey)) .sorted(Comparator.comparingInt(ProviderHandler::getPriority)) .findFirst().orElse(null); } protected  AbstractProviderHandlerRegistry(); protected  AbstractProviderHandlerRegistry(final Instance<T> handlerInstance); boolean isProviderInstalled(ProviderTypeKey providerTypeKey); T getProviderHandler(ProviderTypeKey providerTypeKey);  }