class Stagemonitor {

	@Deprecated
	public static void reset() {
		reset(null);
	}

}

class StagemonitorTest {

	private static ConfigurationRegistry originalConfiguration;
	private final HealthCheckRegistry healthCheckRegistry;
	private ConfigurationRegistry configuration;
	private CorePlugin corePlugin;

	@Test
	public void testDisabledPlugin() throws Exception {

		when(corePlugin.isStagemonitorActive()).thenReturn(true);
		when(corePlugin.getDisabledPlugins()).thenReturn(Collections.singletonList("TestExceptionPlugin"));

		Stagemonitor.reset(new MeasurementSession("StagemonitorTest", "testHost", "testInstance"));

		assertThat(healthCheckRegistry.runHealthCheck("TestPlugin").isHealthy()).isTrue();
		assertThat(healthCheckRegistry.runHealthCheck("TestExceptionPlugin").isHealthy()).isFalse();
		assertThat(healthCheckRegistry.runHealthCheck("TestExceptionPlugin").getMessage()).isEqualTo("disabled via configuration");
	}

}