use of com.netflix.exhibitor.core.config.ConfigManager in project exhibitor by soabase.
the class TestMonitorRunningInstance method makeMockExhibitor.
private Exhibitor makeMockExhibitor(InstanceConfig config, String us) {
Preferences preferences = Mockito.mock(Preferences.class);
ControlPanelValues controlPanelValues = new ControlPanelValues(preferences) {
@Override
public boolean isSet(ControlPanelTypes type) throws Exception {
return true;
}
};
ConfigManager configManager = Mockito.mock(ConfigManager.class);
Mockito.when(configManager.getConfig()).thenReturn(config);
Exhibitor mockExhibitor = Mockito.mock(Exhibitor.class, Mockito.RETURNS_MOCKS);
Mockito.when(mockExhibitor.getConfigManager()).thenReturn(configManager);
Mockito.when(mockExhibitor.getThisJVMHostname()).thenReturn(us);
Mockito.when(mockExhibitor.getControlPanelValues()).thenReturn(controlPanelValues);
return mockExhibitor;
}
Aggregations