JsonConv { public static Obj digest(ManagedAcl acl) { return obj(p(KEY_ID, acl.getId()), p(KEY_NAME, acl.getName())); } private  JsonConv(); static Obj digest(ManagedAcl acl); static Obj full(ManagedAcl acl); static Obj full(AccessControlList acl); static Obj full(AccessControlEntry ace); static final String KEY_ID; static final String KEY_NAME; static final String KEY_ORGANIZATION_ID; static final String KEY_ACL; static final String KEY_ACE; static final String KEY_ROLE; static final String KEY_ACTION; static final String KEY_ALLOW; static final Function<ManagedAcl, Val> fullManagedAcl; static final Function<AccessControlEntry, Val> fullAccessControlEntry; }
@Test public void testManagedAclDigest() { String json = JsonConv.digest(macl).toJson(); JsonPath jp = from(json); logger.info(json); assertEquals(2, ((Map) jp.get()).size()); assertEquals(new Integer(1), jp.get("id")); assertEquals("Public", jp.get("name")); }