OsService osService = mock(OsService.class);
OsStats osStats = mock(OsStats.class);
when(osService.stats()).thenReturn(osStats);
when(osStats.loadAverage()).thenReturn(new double[]{1, 5, 15});
bind(OsService.class).toInstance(osService);
Discovery discovery = mock(Discovery.class);
bind(Discovery.class).toInstance(discovery);
DiscoveryNode node = mock(DiscoveryNode.class);
when(discovery.localNode()).thenReturn(node);
when(node.getId()).thenReturn("node-id-1");
when(node.getName()).thenReturn("node 1");
}