ClusterState state = mock(ClusterState.class);
MetaData metaData = mock(MetaData.class);
when(metaData.settings()).thenReturn(ImmutableSettings.EMPTY);
when(metaData.persistentSettings()).thenReturn(ImmutableSettings.EMPTY);
when(metaData.transientSettings()).thenReturn(ImmutableSettings.EMPTY);
when(state.metaData()).thenReturn(metaData);
when(clusterService.state()).thenReturn(state);
bind(ClusterService.class).toInstance(clusterService);
bind(Settings.class).toInstance(ImmutableSettings.EMPTY);
OsService osService = mock(OsService.class);
OsStats osStats = mock(OsStats.class);