public void copyTo(HttpServletRequest httpRequest, HttpServletResponse httpResponse)
			throws IOException {
		if (shouldMock()) {
			return;
		}
		assert httpRequest != null;
		assert httpResponse != null;
		final long start = System.currentTimeMillis();
		int dataLength = -1;
		try {
			final URLConnection connection = openConnection();
			// pour traductions
			connection.setRequestProperty("Accept-Language",
					httpRequest.getHeader("Accept-Language"));
			connection.connect();
			httpResponse.setContentType(connection.getContentType());
			// Content-Disposition pour téléchargement hs_err_pid par exemple
			final String contentDisposition = connection.getHeaderField("Content-Disposition");
			if (contentDisposition != null) {
				httpResponse.setHeader("Content-Disposition", contentDisposition);
			}
			final OutputStream output = httpResponse.getOutputStream();
			dataLength = pump(output, connection);
		} finally {
			LOG.info("http call done in " + (System.currentTimeMillis() - start) + " ms with "
					+ dataLength / 1024 + " KB read for " + url);
		}
	}
@Test
	public void testCopyTo() throws IOException {
		Utils.setProperty(Parameters.PARAMETER_SYSTEM_PREFIX + "mockLabradorRetriever", "false");
		final File file = File.createTempFile("testLabradorRetriever", null);
		try {
			final HttpServletRequest request = createNiceMock(HttpServletRequest.class);
			final HttpServletResponse response = createNiceMock(HttpServletResponse.class);
			// si le fichier n'était pas vide il faudrait retourner un ByteArrayOutputStream
			// pour response.getOutputStream() en utilisant expect et replay
			new LabradorRetriever(file.toURI().toURL()).copyTo(request, response);
		} finally {
			if (!file.delete()) {
				file.deleteOnExit();
			}
		}
	}