### Question:
SparqlWebService { private Response select(String query, String resultType, HttpServletRequest request) { try { List<String> acceptHeaders = EnumerationUtils.toList(request.getHeaders(ACCEPT)); if (StringUtils.isBlank(query)) { for(String acceptHeader : acceptHeaders) { if (acceptHeader.contains("html")) { return Response.seeOther(new URI(configurationService.getServerUri() + "sparql/admin/squebi.html")).build(); } } return Response.status(Status.ACCEPTED).entity("no SPARQL query specified").build(); } else { QueryType queryType = sparqlService.getQueryType(QueryLanguage.SPARQL, query); List<ContentType> acceptedTypes; List<ContentType> offeredTypes; if (resultType != null) { acceptedTypes = MarmottaHttpUtils.parseAcceptHeader(resultType); } else { acceptedTypes = MarmottaHttpUtils.parseAcceptHeaders(acceptHeaders); } if (QueryType.TUPLE.equals(queryType)) { offeredTypes = MarmottaHttpUtils.parseQueryResultFormatList(TupleQueryResultWriterRegistry.getInstance().getKeys()); } else if (QueryType.BOOL.equals(queryType)) { offeredTypes = MarmottaHttpUtils.parseQueryResultFormatList(BooleanQueryResultWriterRegistry.getInstance().getKeys()); } else if (QueryType.GRAPH.equals(queryType)) { Set<String> producedTypes = new HashSet<>(exportService.getProducedTypes()); producedTypes.remove("application/xml"); producedTypes.remove("text/plain"); producedTypes.remove("text/html"); producedTypes.remove("application/xhtml+xml"); offeredTypes = MarmottaHttpUtils.parseStringList(producedTypes); } else { return Response.status(Response.Status.BAD_REQUEST).entity("no result format specified or unsupported result format").build(); } ContentType bestType = MarmottaHttpUtils.bestContentType(offeredTypes, acceptedTypes); if (bestType == null) { return Response.status(Response.Status.UNSUPPORTED_MEDIA_TYPE).entity("no result format specified or unsupported result format").build(); } else { return buildQueryResponse(bestType, query, queryType); } } } catch (InvalidArgumentException e) { log.error("query parsing threw an exception", e); return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build(); } catch (Exception e) { log.error("query execution threw an exception", e); return Response.serverError().entity("query not supported").build(); } }  @GET Response get(@QueryParam("query") String query, @QueryParam("update") String update, @Context HttpServletRequest request); @POST Response post(@Context HttpServletRequest request); @GET @Path(SELECT) Response selectGet(@QueryParam("query") String query, @QueryParam("output") String resultType, @Context HttpServletRequest request); @POST @Consumes({"application/x-www-url-form-urlencoded", "application/x-www-form-urlencoded"}) @Path(SELECT) Response selectPostForm(@FormParam("query") String query,
                                   @QueryParam("output") String resultType,
                                   @Context HttpServletRequest request); @POST @Consumes("*/*") @Path(SELECT) Response selectPost(@QueryParam("output") String resultType, @Context HttpServletRequest request); @GET @Path(UPDATE) Response updateGet(@QueryParam("update") String update, @QueryParam("query") String query, @QueryParam("output") String resultType, @Context HttpServletRequest request); @POST @Path(UPDATE) @Consumes("application/sparql-update") Response updatePostDirectly(@Context HttpServletRequest request, @QueryParam("output") String resultType); @POST @Path(UPDATE) @Consumes({"application/x-www-url-form-urlencoded", "application/x-www-form-urlencoded"}) Response updatePostUrlEncoded(@Context HttpServletRequest request); static final String PATH; static final String SELECT; static final String UPDATE; }### Answer:
@Test public void testSelect() throws IOException, InterruptedException { expect(). log().ifError(). statusCode(200). given(). param("query", "SELECT ?o WHERE { <http: when(). get("/sparql/select"); }