use of com.github.jnidzwetzki.bitfinex.v2.manager.PositionManager in project bitfinex-v2-wss-api-java by jnidzwetzki.
the class PositionTest method buildMockedBitfinexConnection.
/**
* Build a mocked bitfinex connection
* @return
*/
private BitfinexApiBroker buildMockedBitfinexConnection() {
final ExecutorService executorService = Executors.newFixedThreadPool(10);
final BitfinexApiBroker bitfinexApiBroker = Mockito.mock(BitfinexApiBroker.class);
Mockito.when(bitfinexApiBroker.getExecutorService()).thenReturn(executorService);
final PositionManager positionManager = new PositionManager(executorService);
Mockito.when(bitfinexApiBroker.getPositionManager()).thenReturn(positionManager);
return bitfinexApiBroker;
}
Aggregations