@Test public void testEnsureHandlerForRegisteredProviderType() throws Exception { ProviderTypeKey providerTypeKey = expectedKeys.get(0); BackendProviderHandler handler = ((BackendProviderHandlerRegistry) handlerRegistry).ensureHandler(providerTypeKey); assertEquals(expectedHandlers.get(0), handler); }
public BackendProviderHandler ensureHandler(ProviderTypeKey providerTypeKey) { final BackendProviderHandler handler = getProviderHandler(providerTypeKey); if (handler == null) { throw new RuntimeException("BackendProviderHandler was not found for providerTypeKey: " + providerTypeKey); } return handler; }
BackendProviderHandlerRegistry extends AbstractProviderHandlerRegistry<BackendProviderHandler> { public BackendProviderHandler ensureHandler(ProviderTypeKey providerTypeKey) { final BackendProviderHandler handler = getProviderHandler(providerTypeKey); if (handler == null) { throw new RuntimeException("BackendProviderHandler was not found for providerTypeKey: " + providerTypeKey); } return handler; } }
BackendProviderHandlerRegistry extends AbstractProviderHandlerRegistry<BackendProviderHandler> { public BackendProviderHandler ensureHandler(ProviderTypeKey providerTypeKey) { final BackendProviderHandler handler = getProviderHandler(providerTypeKey); if (handler == null) { throw new RuntimeException("BackendProviderHandler was not found for providerTypeKey: " + providerTypeKey); } return handler; } BackendProviderHandlerRegistry(); @Inject  BackendProviderHandlerRegistry(final @Any Instance<BackendProviderHandler> handlerInstance); }
BackendProviderHandlerRegistry extends AbstractProviderHandlerRegistry<BackendProviderHandler> { public BackendProviderHandler ensureHandler(ProviderTypeKey providerTypeKey) { final BackendProviderHandler handler = getProviderHandler(providerTypeKey); if (handler == null) { throw new RuntimeException("BackendProviderHandler was not found for providerTypeKey: " + providerTypeKey); } return handler; } BackendProviderHandlerRegistry(); @Inject  BackendProviderHandlerRegistry(final @Any Instance<BackendProviderHandler> handlerInstance); BackendProviderHandler ensureHandler(ProviderTypeKey providerTypeKey); }
BackendProviderHandlerRegistry extends AbstractProviderHandlerRegistry<BackendProviderHandler> { public BackendProviderHandler ensureHandler(ProviderTypeKey providerTypeKey) { final BackendProviderHandler handler = getProviderHandler(providerTypeKey); if (handler == null) { throw new RuntimeException("BackendProviderHandler was not found for providerTypeKey: " + providerTypeKey); } return handler; } BackendProviderHandlerRegistry(); @Inject  BackendProviderHandlerRegistry(final @Any Instance<BackendProviderHandler> handlerInstance); BackendProviderHandler ensureHandler(ProviderTypeKey providerTypeKey);  }