use of org.glassfish.jersey.server.internal.monitoring.MonitoringFeature in project jersey by jersey.
the class MonitoringFeatureTest method testAllDisabled2.
@Test
public void testAllDisabled2() {
final ResourceConfig resourceConfig = new ResourceConfig();
final MonitoringFeature monitoringFeature = new MonitoringFeature();
resourceConfig.register(monitoringFeature);
resourceConfig.property(ServerProperties.MONITORING_STATISTICS_MBEANS_ENABLED, false);
resourceConfig.property(ServerProperties.MONITORING_STATISTICS_ENABLED, false);
final ApplicationHandler applicationHandler = new ApplicationHandler(resourceConfig);
final ResourceConfig config = applicationHandler.getConfiguration();
Assert.assertTrue(config.isRegistered(ApplicationInfoListener.class));
Assert.assertFalse(config.isRegistered(MonitoringEventListener.class));
Assert.assertFalse(config.isRegistered(MBeanExposer.class));
}
Aggregations