Map<String,String> hm = new HashMap<String,String>();
CapabilityCalculator loader = new CapabilityCalculator();
List<RoleBasedPermission> perms = new ArrayList<RoleBasedPermission>();
perms.add(new RoleBasedPermission("", RoleTypes.PACKAGE_DEVELOPER, null, null));
perms.add(new RoleBasedPermission("", RoleTypes.ANALYST, null, null));
Capabilities caps = loader.calcCapabilities(perms, hm);
assertTrue(caps.list.contains(Capabilities.SHOW_PACKAGE_VIEW));
assertSame(hm, caps.prefs);
perms = new ArrayList<RoleBasedPermission>();
perms.add(new RoleBasedPermission("", RoleTypes.PACKAGE_ADMIN, null, null));