### Question:
HAZKUtil { public static List<ZKAuthInfo> parseAuth(String authString) { List<ZKAuthInfo> ret = Lists.newArrayList(); if (authString == null) { return ret; } List<String> authComps = Lists.newArrayList( Splitter.on(',').omitEmptyStrings().trimResults() .split(authString)); for (String comp : authComps) { String parts[] = comp.split(":", 2); if (parts.length != 2) { throw new BadAuthFormatException( "Auth '" + comp + "' not of expected form scheme:auth"); } ret.add(new ZKAuthInfo(parts[0], parts[1].getBytes(Charsets.UTF_8))); } return ret; }  static List<ACL> parseACLs(String aclString); static List<ZKAuthInfo> parseAuth(String authString); static String resolveConfIndirection(String valInConf);  }### Answer:
@Test public void testEmptyAuth() { List<ZKAuthInfo> result = HAZKUtil.parseAuth(""); assertTrue(result.isEmpty()); }
@Test public void testNullAuth() { List<ZKAuthInfo> result = HAZKUtil.parseAuth(null); assertTrue(result.isEmpty()); }
@Test public void testGoodAuths() { List<ZKAuthInfo> result = HAZKUtil.parseAuth( "scheme:data,\n scheme2:user:pass"); assertEquals(2, result.size()); ZKAuthInfo auth0 = result.get(0); assertEquals("scheme", auth0.getScheme()); assertEquals("data", new String(auth0.getAuth())); ZKAuthInfo auth1 = result.get(1); assertEquals("scheme2", auth1.getScheme()); assertEquals("user:pass", new String(auth1.getAuth())); }