### Question:
RestAuthHttpCallbackHandler extends AbstractRestAuthCallbackHandler<HttpCallback> { public JsonValue convertToJson(HttpCallback callback, int index) throws RestAuthException { throw new RestAuthException(ResourceException.BAD_REQUEST, new UnsupportedOperationException( "HttpCallback Authorization Header must be specified in the initial request. Cannot be converted into" + " a JSON representation.")); }  boolean updateCallbackFromRequest(HttpServletRequest request, HttpServletResponse response,
            HttpCallback callback); HttpCallback handle(HttpServletRequest request, HttpServletResponse response,
            JsonValue postBody, HttpCallback originalCallback); String getCallbackClassName(); JsonValue convertToJson(HttpCallback callback, int index); HttpCallback convertFromJson(HttpCallback callback, JsonValue jsonCallback);  }### Answer:
@Test (expectedExceptions = RestAuthException.class) public void shouldFailConvertToJson() throws RestAuthException { restAuthHttpCallbackHandler.convertToJson(null, 1); fail(); }