private TomcatInformations(ObjectName threadPool) throws JMException {
		super();
		name = threadPool.getKeyProperty("name");
		maxThreads = MBeansAccessor.getAttribute(threadPool, "maxThreads");
		currentThreadCount = MBeansAccessor.getAttribute(threadPool, "currentThreadCount");
		currentThreadsBusy = MBeansAccessor.getAttribute(threadPool, "currentThreadsBusy");
		ObjectName grp = null;
		for (final ObjectName globalRequestProcessor : GLOBAL_REQUEST_PROCESSORS) {
			if (name.equals(globalRequestProcessor.getKeyProperty("name"))) {
				grp = globalRequestProcessor;
				break;
			}
		}
		if (grp != null) {
			bytesReceived = MBeansAccessor.getAttribute(grp, "bytesReceived");
			bytesSent = MBeansAccessor.getAttribute(grp, "bytesSent");
			requestCount = MBeansAccessor.getAttribute(grp, "requestCount");
			errorCount = MBeansAccessor.getAttribute(grp, "errorCount");
			processingTime = MBeansAccessor.getAttribute(grp, "processingTime");
			maxTime = MBeansAccessor.getAttribute(grp, "maxTime");
		} else {
			bytesReceived = 0;
			bytesSent = 0;
			requestCount = 0;
			errorCount = 0;
			processingTime = 0;
			maxTime = 0;
		}
	}
@Test
	public void testTomcatInformations() throws JMException {
		System.setProperty("catalina.home", "unknown");
		// ce premier appel crée un MBeanServer
		TomcatInformations.initMBeans();
		assertNotNull("buildTomcatInformationsList",
				TomcatInformations.buildTomcatInformationsList());
		final MBeanServer mBeanServer = MBeans.getPlatformMBeanServer();
		final List<ObjectName> mBeans = new ArrayList<>();
		mBeans.add(
				mBeanServer
						.registerMBean(new ThreadPool(),
								new ObjectName("Catalina:type=ThreadPool,name=http-8080"))
						.getObjectName());
		TomcatInformations.initMBeans();
		try {
			// les appels suivants réutilise le MBeanServer créé
			assertNotNull("buildTomcatInformationsList",
					TomcatInformations.buildTomcatInformationsList());
			mBeans.add(
					mBeanServer
							.registerMBean(new GlobalRequestProcessor(),
									new ObjectName(
											"Catalina:type=GlobalRequestProcessor,name=http-8080"))
							.getObjectName());
			TomcatInformations.initMBeans();
			assertNotNull("buildTomcatInformationsList",
					TomcatInformations.buildTomcatInformationsList());
			for (final TomcatInformations tomcatInformations : TomcatInformations
					.buildTomcatInformationsList()) {
				tomcatInformations.toString();
			}

			final Counter counter = new Counter("http", null);
			final Collector collector = new Collector("test", List.of(counter));
			final ServletContext context = createNiceMock(ServletContext.class);
			expect(context.getServerInfo()).andReturn("Mock").anyTimes();
			expect(context.getMajorVersion()).andReturn(5).anyTimes();
			expect(context.getMinorVersion()).andReturn(0).anyTimes();
			expect(context.getContextPath()).andReturn("/test").anyTimes();
			replay(context);
			Parameters.initialize(context);
			collector.collectLocalContextWithoutErrors();
			verify(context);
		} finally {
			for (final ObjectName registeredMBean : mBeans) {
				mBeanServer.unregisterMBean(registeredMBean);
			}
			TomcatInformations.initMBeans();
		}
	}