assertTrue(jsonResponse.getHeaders().size() > 0);
assertTrue(jsonResponse.getBody().toString().length() > 0);
assertFalse(jsonResponse.getRawBody() == null);
assertEquals(200, jsonResponse.getStatus());
JsonNode json = jsonResponse.getBody();
assertFalse(json.isArray());
assertTrue(jsonResponse.getBody().getObject().getJSONObject("headers").has("X-Custom-Header"));
assertEquals("hello", json.getObject().getJSONObject("headers").getString("X-Custom-Header"));
assertTrue(jsonResponse.getBody().getObject().getJSONObject("headers").has("User-Agent"));
assertEquals("foobar", json.getObject().getJSONObject("headers").getString("User-Agent"));
jsonResponse = Unirest.get("http://httpbin.org/headers").asJson();
assertTrue(jsonResponse.getBody().getObject().getJSONObject("headers").has("X-Custom-Header"));
assertEquals("hello", jsonResponse.getBody().getObject().getJSONObject("headers").getString("X-Custom-Header"));