This repository was archived by the owner on Sep 16, 2020. It is now read-only.

Description
Various services follow the pattern below which makes them hard to unit test.
public MessageService(SymphonyClient symClient) {
this.symClient = symClient;
//Lets startup the worker thread to listen for raw datafeed messages
dataFeedWorker = new DataFeedWorker(symClient, this);
new Thread(dataFeedWorker, "DataFeedWorker: "+ symClient.getName()).start();
}
To simplify and reduce the components that need to be initialised in unit testing, i suggest we extract the initialisation of the runnables out of the constructors into a private init method and perform the initialisation based on a new lazyInit attribute added to the ClientConfig and built using the ClientConfigBuilder