### Question:
HAZKUtil { public static List<ACL> parseACLs(String aclString) { List<ACL> acl = Lists.newArrayList(); if (aclString == null) { return acl; } List<String> aclComps = Lists.newArrayList( Splitter.on(',').omitEmptyStrings().trimResults() .split(aclString)); for (String a : aclComps) { int firstColon = a.indexOf(':'); int lastColon = a.lastIndexOf(':'); if (firstColon == -1 || lastColon == -1 || firstColon == lastColon) { throw new BadAclFormatException( "ACL '" + a + "' not of expected form scheme:id:perm"); } ACL newAcl = new ACL(); newAcl.setId(new Id(a.substring(0, firstColon), a.substring( firstColon + 1, lastColon))); newAcl.setPerms(getPermFromString(a.substring(lastColon + 1))); acl.add(newAcl); } return acl; }  static List<ACL> parseACLs(String aclString); static List<ZKAuthInfo> parseAuth(String authString); static String resolveConfIndirection(String valInConf);  }### Answer:
@Test public void testEmptyACL() { List<ACL> result = HAZKUtil.parseACLs(""); assertTrue(result.isEmpty()); }
@Test public void testNullACL() { List<ACL> result = HAZKUtil.parseACLs(null); assertTrue(result.isEmpty()); }
@Test public void testGoodACLs() { List<ACL> result = HAZKUtil.parseACLs( "sasl:hdfs/host1@MY.DOMAIN:cdrwa, sasl:hdfs/host2@MY.DOMAIN:ca"); ACL acl0 = result.get(0); assertEquals(Perms.CREATE | Perms.DELETE | Perms.READ | Perms.WRITE | Perms.ADMIN, acl0.getPerms()); assertEquals("sasl", acl0.getId().getScheme()); assertEquals("hdfs/host1@MY.DOMAIN", acl0.getId().getId()); ACL acl1 = result.get(1); assertEquals(Perms.CREATE | Perms.ADMIN, acl1.getPerms()); assertEquals("sasl", acl1.getId().getScheme()); assertEquals("hdfs/host2@MY.DOMAIN", acl1.getId().getId()); }