@Test
public void testDXAPICustomEnvironment() throws IOException {

    DXEnvironment env = DXEnvironment.Builder.fromDefaults().build();
    JsonNode input =
            (JsonNode) (new MappingJsonFactory().createParser("{}").readValueAsTree());
    JsonNode responseJson = DXAPI.systemFindDataObjects(input, JsonNode.class, env);
    Assert.assertEquals(responseJson.isObject(), true);
    DXEnvironment bogusContextEnv =
            DXEnvironment.Builder.fromDefaults().setBearerToken("BOGUS").build();
    try {
        DXAPI.systemFindDataObjects(input, JsonNode.class, bogusContextEnv);
        Assert.fail("Expected request with bogus token to throw InvalidAuthentication");
    } catch (InvalidAuthenticationException e) {
        // Expected
    }
}