### Question:
AuthorizationsUtil { public static String buildUserAuthorizationString(Principal principal) { String auths = ""; if (principal != null && (principal instanceof DatawavePrincipal)) { DatawavePrincipal datawavePrincipal = (DatawavePrincipal) principal; auths = new Authorizations(datawavePrincipal.getPrimaryUser().getAuths().toArray(new String[0])).toString(); } return auths; }  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 testBuildUserAuthorizationsString() { String expected = new Authorizations("A", "C", "D").toString(); assertEquals(expected, AuthorizationsUtil.buildUserAuthorizationString(principal)); }