### Question:
AcmPluginManager implements ApplicationContextAware, ApplicationListener<AbstractContextHolderEvent> { public List<String> getPrivilegesForRole(String role) { if (configurablePrivilegesByRole.containsKey(role)) { return Collections.unmodifiableList(configurablePrivilegesByRole.get(role)); } else { String wildCardRole = StringUtils.substringBeforeLast(role, "@") + "@*"; if (configurablePrivilegesByRole.containsKey(wildCardRole)) { return Collections.unmodifiableList(configurablePrivilegesByRole.get(wildCardRole)); } else { return Collections.emptyList(); } } }  synchronized Collection<AcmPlugin> getAcmPlugins(); synchronized void registerPlugin(AcmPlugin plugin); @Override void setApplicationContext(ApplicationContext applicationContext); List<String> getPrivilegesForRole(String role); List<AcmPluginUrlPrivilege> getUrlPrivileges(); List<String> getRolesForPrivilege(String privilege); synchronized void registerPluginPrivileges(AcmPluginPrivileges pluginPrivileges); void setSpringContextHolder(SpringContextHolder springContextHolder); @Override void onApplicationEvent(AbstractContextHolderEvent event); static final String PLUGINS_PRIVILEGES_FOLDER_NAME; }### Answer:
@Test public void getPrivilegesForRole() { AcmPlugin plugin = createPlugin("test plugin"); unit.registerPlugin(plugin); List<String> privileges = unit.getPrivilegesForRole(roleAdd); assertEquals(1, privileges.size()); assertEquals(privilegeAdd, privileges.get(0)); }