public static void oneTimeTearDown() throws Exception {
}
@Test
public void testDumper() throws IOException {
StopWatch stopWatch = new StopWatch("testErrorFileDumper");
stopWatch.start(Thread.currentThread().getName() + " generating error dumps");
for (int i=0; i < LOOP_COUNT; i++) {
MockHttpServletRequest request = new MockHttpServletRequest();
request.setRequestURI("/cms");
request.setQueryString("name=value");
request.addHeader("headerName", "headerValue");
ErrorFileDumper.dumpToFile(new Throwable("mock error " + i), (HttpServletRequest) request);
}
stopWatch.stop();
long totalTime = stopWatch.getTotalTimeMillis();
double averageTime = ((double) totalTime) / ((double) LOOP_COUNT);
logger.info("Milliseconds per exception = " + averageTime);
logger.info(stopWatch.prettyPrint());
}