public Long answer(InvocationOnMock invocation) throws Throwable {
return 42L;
}
});
NetworkStats networkStats = mock(NetworkStats.class);
when(networkStats.tcp()).thenReturn(tcp);
NetworkService networkService = mock(NetworkService.class);
when(networkService.stats()).thenReturn(networkStats);
bind(NetworkService.class).toInstance(networkService);
bind(NodeService.class).toInstance(nodeService);