DXDataObject extends DXObject { @VisibleForTesting static Map<String, AccessLevel> deserializeListProjectsMap(JsonNode result) { try { return listProjectsReader.<Map<String, AccessLevel>>readValue(result); } catch (JsonProcessingException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } } protected  DXDataObject(String dxId, String className, DXContainer project, DXEnvironment env,
            JsonNode cachedDescribe); protected  DXDataObject(String dxId, String className, DXEnvironment env, JsonNode cachedDescribe); static DXDataObject getInstance(String objectId); static DXDataObject getInstance(String objectId, DXContainer project); static DXDataObject getInstanceWithEnvironment(String objectId, DXContainer project,
            DXEnvironment env); static DXDataObject getInstanceWithEnvironment(String objectId, DXEnvironment env); void addTags(List<String> tags); void addTypes(List<String> types); DXDataObject close(); DXDataObject closeAndWait(); Describe describe(); Describe describe(DescribeOptions options); @Override boolean equals(Object obj); Describe getCachedDescribe(); @JsonValue JsonNode getLinkAsJson(); DXContainer getProject(); @Override int hashCode(); Map<DXContainer, AccessLevel> listProjects(); void putAllProperties(Map<String, String> properties); void putAllProperties(Map<String, String> propertiesToSet,
            List<String> propertiesToRemove); void putProperty(String key, String value); void removeProperty(String key); void removeTags(List<String> tags); void removeTypes(List<String> types); void rename(String newName); void setDetails(Object details); void setVisibility(boolean visible);  }
@Test public void testDeserializeProjectsMap() throws IOException { JsonNode input = DXJSON.parseJson("{\"project-0000\": \"CONTRIBUTE\", \"project-1111\": \"ADMINISTER\"}"); Map<String, AccessLevel> listProjectsResponse = DXDataObject.deserializeListProjectsMap(input); Map<String, AccessLevel> expected = ImmutableMap.of("project-0000", AccessLevel.CONTRIBUTE, "project-1111", AccessLevel.ADMINISTER); Assert.assertEquals(expected, listProjectsResponse); }