### Question:
ODLJndiLdapRealm extends DefaultLdapRealm { public static AuthorizationInfo buildAuthorizationInfo(final Set<String> roleNames) { if (null == roleNames) { return null; } return new SimpleAuthorizationInfo(roleNames); } ODLJndiLdapRealm(); static String getUsername(AuthenticationToken token); static AuthorizationInfo buildAuthorizationInfo(final Set<String> roleNames); @Override String getUserDnSuffix(); void setSearchBase(final String searchBase); void setLdapAttributeForComparison(final String ldapAttributeForComparison); void setGroupRolesMap(final Map<String, String> groupRolesMap);  }### Answer:
@Test public void testBuildAuthorizationInfo() { assertNull(ODLJndiLdapRealm.buildAuthorizationInfo(null)); Set<String> roleNames = new HashSet<>(); roleNames.add("engineering"); AuthorizationInfo authorizationInfo = ODLJndiLdapRealm.buildAuthorizationInfo(roleNames); assertNotNull(authorizationInfo); assertFalse(authorizationInfo.getRoles().isEmpty()); assertTrue(authorizationInfo.getRoles().contains("engineering")); }