@Test public void createTransactionRequester() { TransactionRequesterFactoryImpl factory = new TransactionRequesterFactoryImpl(); Config config = mock(Config.class); ServerConfig serverConfig = mock(ServerConfig.class); when(serverConfig.getCommunicationType()).thenReturn(CommunicationType.REST); when(config.getP2PServerConfig()).thenReturn(serverConfig); TransactionRequester requester = factory.createTransactionRequester(config); assertThat(requester).isNotNull().isExactlyInstanceOf(TransactionRequesterImpl.class); }
public TransactionRequester createTransactionRequester(Config config) { Enclave enclave = EnclaveFactory.create().create(config); ResendClient resendClient = ResendClientFactory.newFactory(config).create(config); return new TransactionRequesterImpl(enclave,resendClient); }
TransactionRequesterFactoryImpl implements TransactionRequesterFactory { public TransactionRequester createTransactionRequester(Config config) { Enclave enclave = EnclaveFactory.create().create(config); ResendClient resendClient = ResendClientFactory.newFactory(config).create(config); return new TransactionRequesterImpl(enclave,resendClient); } }
TransactionRequesterFactoryImpl implements TransactionRequesterFactory { public TransactionRequester createTransactionRequester(Config config) { Enclave enclave = EnclaveFactory.create().create(config); ResendClient resendClient = ResendClientFactory.newFactory(config).create(config); return new TransactionRequesterImpl(enclave,resendClient); }  }
TransactionRequesterFactoryImpl implements TransactionRequesterFactory { public TransactionRequester createTransactionRequester(Config config) { Enclave enclave = EnclaveFactory.create().create(config); ResendClient resendClient = ResendClientFactory.newFactory(config).create(config); return new TransactionRequesterImpl(enclave,resendClient); }  TransactionRequester createTransactionRequester(Config config); }
TransactionRequesterFactoryImpl implements TransactionRequesterFactory { public TransactionRequester createTransactionRequester(Config config) { Enclave enclave = EnclaveFactory.create().create(config); ResendClient resendClient = ResendClientFactory.newFactory(config).create(config); return new TransactionRequesterImpl(enclave,resendClient); }  TransactionRequester createTransactionRequester(Config config);  }