### Question:
RestServlet extends HttpServlet { @Override protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if (this instanceof Options) { RestUrl url = parse(req); if (url.isValid()) { ((Options) this).options(req, resp, url); } else { onInvalidUrl(url); super.doOptions(req, resp); } } } protected  RestServlet(String pattern, VarType... types); @Override final void doGet(HttpServletRequest req, HttpServletResponse resp); @Override final void doPost(HttpServletRequest req, HttpServletResponse resp); @Override final void doPut(HttpServletRequest req, HttpServletResponse resp); @Override final void doDelete(HttpServletRequest req, HttpServletResponse resp);  }### Answer:
@Test public void whenUrlIsValidThenOptionsIsCalled() throws ServletException, IOException { servlet.doOptions(request, response); verify(callback).onMethodCalled(Options); }