### Question:
Acl { public static Acl createAcl(String permittedUsers, String permittedGroups, String deniedUsers, String deniedGroups) { return buildAcl(splitList(permittedUsers), splitList(permittedGroups), splitList(deniedUsers), splitList(deniedGroups)); } private  Acl(Builder builder); Set<Principal> getReaders(); Set<Principal> getDeniedReaders(); Set<Principal> getOwners(); String getInheritFrom(); String getInheritFromFragment(); InheritanceType getInheritanceType(); Item createFragmentItemOf(String id, String fragment); Item applyTo(Item item); static String fragmentId(String id, String fragment); static String getPrincipalName(String name, String namespace); static Principal getGoogleUserPrincipal(String userId); static Principal getGoogleGroupPrincipal(String groupId); static Principal getCustomerPrincipal(); static Principal getUserPrincipal(String userId); static Principal getUserPrincipal(String userId, String identitySourceId); static Principal getGroupPrincipal(String groupId); static Principal getGroupPrincipal(String groupId, String identitySourceId); static boolean addResourcePrefixUser(Principal user, String identitySourceId); static boolean addResourcePrefixGroup(Principal group, String identitySourceId); static PrincipalType getPrincipalType(Principal p); static Acl createAcl(String permittedUsers, String permittedGroups, String deniedUsers,
      String deniedGroups); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final String IDENTITY_SOURCES_PREFIX; static final String IDENTITY_RESOURCE_NAME_FORMAT; static final String USER_RESOURCE_NAME_FORMAT; static final String GROUP_NAME_FORMAT; static final UserPrincipalParser USER_PARSER; static final GroupPrincipalParser GROUP_PARSER; static final String GOOGLE_ACCOUNT_PREFIX; }### Answer:
@Test public void testCreateAcl() { Acl targetAcl = new Acl.Builder() .setReaders( Arrays.asList( Acl.getUserPrincipal("extUser1"), Acl.getGoogleUserPrincipal("user1"), Acl.getGroupPrincipal("extGroup1"), Acl.getGoogleGroupPrincipal("group1"))) .setDeniedReaders( Arrays.asList( Acl.getUserPrincipal("deny1"), Acl.getUserPrincipal("deny2"), Acl.getGroupPrincipal("extDenyGroup1"), Acl.getGoogleGroupPrincipal("denyGroup1"))) .build(); Acl acl = Acl.createAcl(" extUser1, google:user1", "extGroup1, google:group1 ", ", deny1, , deny2 , ", "extDenyGroup1, google:denyGroup1"); assertEquals(targetAcl, acl); }
@Test public void testEmptyCreateAcl() { assertEquals(new Acl.Builder().build(), Acl.createAcl(" ", " ", " , ", "")); }