### Question:
InfoServlet extends TransformationServlet { @Override protected void service(WorkbenchRequest req, HttpServletResponse resp, String xslPath) throws Exception { String id = info.getId(); if (null != id && !manager.hasRepositoryConfig(id)) { throw new RepositoryConfigException(id + " does not exist."); } TupleResultBuilder builder = getTupleResultBuilder(req, resp, resp.getOutputStream()); builder.start("id", "description", "location", "server", "readable", "writeable", "default-limit", "default-queryLn", "default-infer", "default-Accept", "default-Content-Type", "upload-format", "query-format", "graph-download-format", "tuple-download-format", "boolean-download-format"); String desc = info.getDescription(); URL loc = info.getLocation(); URL server = getServer(); builder.result(id, desc, loc, server, info.isReadable(), info.isWritable()); builder.namedResult("default-limit", req.getParameter("limit")); builder.namedResult("default-queryLn", req.getParameter("queryLn")); builder.namedResult("default-infer", req.getParameter("infer")); builder.namedResult("default-Accept", req.getParameter("Accept")); builder.namedResult("default-Content-Type", req.getParameter("Content-Type")); for (RDFParserFactory parser : RDFParserRegistry.getInstance().getAll()) { String mimeType = parser.getRDFFormat().getDefaultMIMEType(); String name = parser.getRDFFormat().getName(); builder.namedResult("upload-format", mimeType + " " + name); } for (QueryParserFactory factory : getInstance().getAll()) { String name = factory.getQueryLanguage().getName(); builder.namedResult("query-format", name + " " + name); } for (RDFWriterFactory writer : RDFWriterRegistry.getInstance().getAll()) { String mimeType = writer.getRDFFormat().getDefaultMIMEType(); String name = writer.getRDFFormat().getName(); builder.namedResult("graph-download-format", mimeType + " " + name); } for (TupleQueryResultWriterFactory writer : TupleQueryResultWriterRegistry.getInstance().getAll()) { String mimeType = writer.getTupleQueryResultFormat().getDefaultMIMEType(); String name = writer.getTupleQueryResultFormat().getName(); builder.namedResult("tuple-download-format", mimeType + " " + name); } for (BooleanQueryResultWriterFactory writer : BooleanQueryResultWriterRegistry.getInstance().getAll()) { String mimeType = writer.getBooleanQueryResultFormat().getDefaultMIMEType(); String name = writer.getBooleanQueryResultFormat().getName(); builder.namedResult("boolean-download-format", mimeType + " " + name); } builder.end(); }  @Override String[] getCookieNames();  }### Answer:
@Test public final void testSES1770regression() throws Exception { when(manager.hasRepositoryConfig(null)).thenThrow(new NullPointerException()); WorkbenchRequest req = mock(WorkbenchRequest.class); when(req.getParameter(anyString())).thenReturn(SESAME.NIL.toString()); HttpServletResponse resp = mock(HttpServletResponse.class); when(resp.getOutputStream()).thenReturn(mock(ServletOutputStream.class)); servlet.service(req, resp, ""); }
@Test public final void testSES1770regression() throws Exception { when(manager.hasRepositoryConfig(null)).thenThrow(new NullPointerException()); WorkbenchRequest req = mock(WorkbenchRequest.class); when(req.getParameter(anyString())).thenReturn(RDF4J.NIL.toString()); HttpServletResponse resp = mock(HttpServletResponse.class); when(resp.getOutputStream()).thenReturn(mock(ServletOutputStream.class)); servlet.service(req, resp, ""); }