private void collectTomcatInformations(List<JavaInformations> javaInformationsList)
			throws IOException {
		int tomcatBusyThreads = 0;
		long bytesReceived = 0;
		long bytesSent = 0;
		boolean tomcatUsed = false;

		for (final JavaInformations javaInformations : javaInformationsList) {
			for (final TomcatInformations tomcatInformations : javaInformations
					.getTomcatInformationsList()) {
				tomcatBusyThreads = add(tomcatInformations.getCurrentThreadsBusy(),
						tomcatBusyThreads);
				bytesReceived = add(tomcatInformations.getBytesReceived(), bytesReceived);
				bytesSent = add(tomcatInformations.getBytesSent(), bytesSent);
				tomcatUsed = true;
			}
		}

		if (tomcatUsed) {
			// collecte des informations de Tomcat
			collectTomcatValues(tomcatBusyThreads, bytesReceived, bytesSent);
		}
	}
@Test
	public void testCollectTomcatInformations() throws JMException {
		final MBeanServer mBeanServer = MBeans.getPlatformMBeanServer();
		final List<ObjectName> mBeans = new ArrayList<>();
		try {
			mBeans.add(mBeanServer
					.registerMBean(new ThreadPool(),
							new ObjectName("Catalina:type=ThreadPool,name=jk-8009"))
					.getObjectName());
			mBeans.add(
					mBeanServer
							.registerMBean(new GlobalRequestProcessor(),
									new ObjectName(
											"Catalina:type=GlobalRequestProcessor,name=jk-8009"))
							.getObjectName());
			TomcatInformations.initMBeans();
			final Collector collector = new Collector(TEST, List.of(new Counter("http", null)));
			// first time to initialize against NOT_A_NUMBER
			collector.collectWithoutErrors(
					Collections.singletonList(new JavaInformations(null, true)));
			// second time to add value
			collector.collectWithoutErrors(
					Collections.singletonList(new JavaInformations(null, true)));
		} finally {
			for (final ObjectName registeredMBean : mBeans) {
				mBeanServer.unregisterMBean(registeredMBean);
			}
			TomcatInformations.initMBeans();
		}
	}