### Question:
AuthorizationsUtil { public static String buildAuthorizationString(Collection<? extends Collection<String>> userAuths) { if (null == userAuths) { return ""; } HashSet<byte[]> b = new HashSet<>(); for (Collection<String> userAuth : userAuths) { for (String string : userAuth) { b.add(string.getBytes()); } } return new Authorizations(b).toString(); }  static Authorizations union(Iterable<byte[]> authorizations1, Iterable<byte[]> authorizations2); static Set<Authorizations> mergeAuthorizations(String requestedAuths, Collection<? extends Collection<String>> userAuths); static Set<Authorizations> getDowngradedAuthorizations(String requestedAuths, Principal principal); static LinkedHashSet<Authorizations> getDowngradedAuthorizations(String requestedAuths, DatawavePrincipal principal); static String downgradeUserAuths(Principal principal, String requested); static List<String> splitAuths(String requestedAuths); static Set<Authorizations> buildAuthorizations(Collection<? extends Collection<String>> userAuths); static String buildAuthorizationString(Collection<? extends Collection<String>> userAuths); static String buildUserAuthorizationString(Principal principal); static Collection<Authorizations> minimize(Collection<Authorizations> authorizations); static Collection<? extends Collection<String>> prepareAuthsForMerge(Authorizations authorizations);  }### Answer:
@Test public void testBuilidAuthorizationString() { Collection<Collection<String>> auths = new HashSet<>(); List<String> authsList = Arrays.asList("A", "B", "C", "D", "E", "F", "G", "H", "A", "E", "I", "J"); HashSet<String> uniqAuths = new HashSet<>(authsList); auths.add(authsList.subList(0, 4)); auths.add(authsList.subList(4, 8)); auths.add(authsList.subList(8, 12)); uniqAuths.removeAll(Arrays.asList(AuthorizationsUtil.buildAuthorizationString(auths).split(","))); assertTrue(uniqAuths.isEmpty()); }