@Test
public void testBadFormat() throws Exception {

  StringWriter sw = new StringWriter();
  try {
    ConfServlet.writeResponse(getTestConf(), sw, "not a format");
    fail("writeResponse with bad format didn't throw!");
  } catch (ConfServlet.BadFormatException bfe) {
    // expected
  }
  assertEquals("", sw.toString());
}