private void removeRequest(Counter counter, CounterRequest newRequest) {
		counter.removeRequest(newRequest.getName());
		requestsById.remove(newRequest.getId());
		final JRobin requestJRobin = requestJRobinsById.remove(newRequest.getId());
		if (requestJRobin != null) {
			requestJRobin.deleteFile();
		}
	}
@Test
	public void testRemoveRequest() {
		final Counter counter = new Counter("error", null);
		counter.setMaxRequestsCount(1);
		final Collector collector = new Collector(TEST, Collections.singletonList(counter));

		// test removeRequest dans collectCounterData
		counter.addRequest("test 1", 0, 0, 0, false, 1000);
		counter.addRequest("test 2", 0, 0, 0, false, 1000);
		for (int i = 0; i < 50; i++) {
			counter.addRequest("test 3", 0, 0, 0, false, 1000);
		}
		collector.collectWithoutErrors(Collections.emptyList());
		if (counter.getRequestsCount() > 1) {
			fail("removeRequest");
		}
		counter.addRequest("test 1", 0, 0, 0, false, 1000);
		counter.addRequest("test 2", 0, 0, 0, false, 1000);
		collector.collectWithoutErrors(Collections.emptyList());
		if (counter.getRequestsCount() > 1) {
			fail("removeRequest");
		}
		for (int i = 0; i < counter.getMaxRequestsCount() * 2; i++) {
			counter.addRequest("test 1", 0, 0, 0, false, 1000);
		}
		for (int i = 0; i <= 10; i++) {
			counter.addRequest("test 2", 0, 0, 0, false, 1000);
		}
		counter.addRequest("test 3", 0, 0, 0, false, 1000);
		counter.addRequest("test 4", 0, 0, 0, false, 1000);
		collector.collectWithoutErrors(Collections.emptyList());
		if (counter.getRequestsCount() > 1) {
			fail("removeRequest");
		}
	}