@Test
public void testDXAPI() throws IOException {

    DXHTTPRequest c = new DXHTTPRequest();
    JsonNode responseJson =
            c.request("/system/findDataObjects", DXJSON.parseJson("{}"),
                    RetryStrategy.SAFE_TO_RETRY);
    Assert.assertEquals(responseJson.isObject(), true);
    // System.out.println(responseJson);
    String responseText =
            c.request("/system/findDataObjects", "{}", RetryStrategy.SAFE_TO_RETRY);
    Assert.assertEquals(responseText.substring(0, 1), "{");
    // Tests deserialization of InvalidInput
    DXHTTPRequest c2 = new DXHTTPRequest();
    try {
        c2.request("/system/findDataObjects",
                DXJSON.parseJson("{\"state\": {\"invalid\": \"oops\"}}"),
                RetryStrategy.SAFE_TO_RETRY);
        Assert.fail("Expected findDataObjects to fail with InvalidInput");
    } catch (InvalidInputException e) {
        // Error message should be something like
        // "expected key \"state\" of input to be a string"
        Assert.assertTrue(e.toString().contains("key \"state\""));
        Assert.assertEquals(422, e.getStatusCode());
    }
}