use of bftsmart.communication.client.ClientCommunicationServerSide in project bftsmart by blockchain-jd-com.
the class TestNodeServer method startNode.
public ServiceReplica startNode(String realmName) {
TOMConfiguration config = initConfig();
try {
// mock messsageHandler and cs
MessageHandler messageHandler = new MessageHandler();
MessageHandler mockMessageHandler = Mockito.spy(messageHandler);
ClientCommunicationServerSide clientCommunication = ClientCommunicationFactory.createServerSide(new ServerViewController(config, new MemoryBasedViewStorage(latestView)));
ServerCommunicationSystem cs = new ServerCommunicationSystemImpl(clientCommunication, mockMessageHandler, new ServerViewController(config, new MemoryBasedViewStorage(latestView)), realmName);
ServerCommunicationSystem mockCs = Mockito.spy(cs);
replica = new ServiceReplica(mockMessageHandler, mockCs, config, this, this, (int) -1, latestView, realmName);
} catch (Exception e) {
e.printStackTrace();
}
return replica;
}
Aggregations