String content = executor.execute(req).assertStatus(200).assertContentType("application/json").getContent(); log.info("JSON content:\n\n {} \n\n",content); JSONObject json = new JSONObject(content);
.withHeader("Accept", "text/html") .assertStatus(200) .assertContentType("text/html"); builder.buildGetRequest("/entityhub/sites/referenced") .withHeader("Accept", "application/json")); re.assertStatus(200); re.assertContentType("application/json"); builder.buildGetRequest("/entityhub/site/"+referencedSite) .withHeader("Accept", "application/json")); //check JSON serializer re.assertStatus(200); re.assertContentType("application/json"); re = executor.execute(builder.buildGetRequest("/entityhub/site/"+referencedSite) .withHeader("Accept", "application/rdf+xml"));//check RDF serializer re.assertStatus(200); re.assertContentType("application/rdf+xml");
log.debug("Assert Query Results for test {}",test.getContent()); re.assertStatus(test.getExpectedStatus()); re.assertContentType("application/json"); //currently only application/json is supported if(!test.expectsSuccess()){