@Test public void test_updateFactory_success() throws FactoryDoesNotExistException { Mockito.when(factories.get(FACT_1)).thenReturn(factory1); serviceToTest.updateFactory(FACT_1,CLIENT_ID, SECRET); Mockito.verify(factory1).update(CLIENT_ID, SECRET); }
@Override public void updateFactory(String factoryName, String clientId, String secret) throws FactoryDoesNotExistException { IAdjustableConnectionFactory factory = connectionFactories.get(factoryName); if (factory == null) { throw new FactoryDoesNotExistException("Factory " + factoryName + " does not exist."); } factory.update(clientId, secret); }
ReloadService implements IReloadService { @Override public void updateFactory(String factoryName, String clientId, String secret) throws FactoryDoesNotExistException { IAdjustableConnectionFactory factory = connectionFactories.get(factoryName); if (factory == null) { throw new FactoryDoesNotExistException("Factory " + factoryName + " does not exist."); } factory.update(clientId, secret); } }
ReloadService implements IReloadService { @Override public void updateFactory(String factoryName, String clientId, String secret) throws FactoryDoesNotExistException { IAdjustableConnectionFactory factory = connectionFactories.get(factoryName); if (factory == null) { throw new FactoryDoesNotExistException("Factory " + factoryName + " does not exist."); } factory.update(clientId, secret); }  }
ReloadService implements IReloadService { @Override public void updateFactory(String factoryName, String clientId, String secret) throws FactoryDoesNotExistException { IAdjustableConnectionFactory factory = connectionFactories.get(factoryName); if (factory == null) { throw new FactoryDoesNotExistException("Factory " + factoryName + " does not exist."); } factory.update(clientId, secret); }  @PostConstruct void init(); @Override void addFactory(String factoryName, IAdjustableConnectionFactory factory); @Override void updateFactory(String factoryName, String clientId, String secret); @Override void updateFactory(String factoryName, String clientId, String secret, String serverUrl); }
ReloadService implements IReloadService { @Override public void updateFactory(String factoryName, String clientId, String secret) throws FactoryDoesNotExistException { IAdjustableConnectionFactory factory = connectionFactories.get(factoryName); if (factory == null) { throw new FactoryDoesNotExistException("Factory " + factoryName + " does not exist."); } factory.update(clientId, secret); }  @PostConstruct void init(); @Override void addFactory(String factoryName, IAdjustableConnectionFactory factory); @Override void updateFactory(String factoryName, String clientId, String secret); @Override void updateFactory(String factoryName, String clientId, String secret, String serverUrl);  }