DefaultsServlet extends AbstractApiServlet { @Override protected void get(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { respondWithJson(resp, defaults); } DefaultsServlet();   }
@Test public void testGet() throws Exception { ServletCaller caller = new ServletCaller(); caller.doGet(new DefaultsServlet()); assertEquals(200, (int) caller.getResponseStatus()); assertTrue(caller.getResponseBody().contains("DEFAULT_")); }