RestAssured.defaultParser = Parser.JSON;
System.out.println("Checking URL: " + jolokiaUrl);
// Need to do it that way since Jolokia doesnt return application/json as mimetype by default
JsonPath json = with(get("/version").asString());
json.prettyPrint();
assertEquals(versionExpected, json.get("value.agent"));
// Alternatively, set the mime type before, then Rest-assured's fluent API can be used
given()
.param("mimeType", "application/json")