IOException ie = new IOException("EOFException");
testServlet.checkException(ie, exceptionMsgRegex, exceptionStackRegex,
shuffleMetrics);
MetricsContext context = factory.getContext("mapred");
shuffleMetrics.doUpdates(context);
Map<String, Collection<OutputRecord>> records = context.getAllRecords();
Collection<OutputRecord> col = records.get("shuffleOutput");
OutputRecord outputRecord = col.iterator().next();
assertEquals(0, outputRecord.getMetric("shuffle_exceptions_caught")
.intValue());