@Test(expected = NullPointerException.class) public void testGetPrincipalsForEntities() { JsonEntityBean bean = buildJsonGroupEntityBean(); List<JsonEntityBean> beans = new ArrayList<JsonEntityBean>(); beans.add(bean); Set<JsonEntityBean> returnBeans = permissionAdministrationHelper.getEntitiesForPrincipals(null); }
@Override public Set<String> getPrincipalsForEntities(Collection<JsonEntityBean> entities) { Set<String> principals = new HashSet<String>(); for (JsonEntityBean entity : entities) { principals.add(entity.getPrincipalString()); } return principals; }
PermissionAdministrationHelper implements IPermissionAdministrationHelper { @Override public Set<String> getPrincipalsForEntities(Collection<JsonEntityBean> entities) { Set<String> principals = new HashSet<String>(); for (JsonEntityBean entity : entities) { principals.add(entity.getPrincipalString()); } return principals; } }
PermissionAdministrationHelper implements IPermissionAdministrationHelper { @Override public Set<String> getPrincipalsForEntities(Collection<JsonEntityBean> entities) { Set<String> principals = new HashSet<String>(); for (JsonEntityBean entity : entities) { principals.add(entity.getPrincipalString()); } return principals; }  }
PermissionAdministrationHelper implements IPermissionAdministrationHelper { @Override public Set<String> getPrincipalsForEntities(Collection<JsonEntityBean> entities) { Set<String> principals = new HashSet<String>(); for (JsonEntityBean entity : entities) { principals.add(entity.getPrincipalString()); } return principals; }  @Autowired(required = true) void setGroupListHelper(IGroupListHelper groupListHelper); @Autowired(required = true) void setPermissionStore(IPermissionStore permissionStore); @Override boolean canEditOwner(IPerson currentUser, String owner); @Override boolean canViewOwner(IPerson currentUser, String owner); @Override boolean canEditActivity(IPerson currentUser, String activity); @Override boolean canViewActivity(IPerson currentUser, String activity); @Override boolean canEditPermission(IPerson currentUser, String target); @Override boolean canViewPermission(IPerson currentUser, String target); @Override Set<JsonEntityBean> getEntitiesForPrincipals(Collection<String> principals); @Override Set<String> getPrincipalsForEntities(Collection<JsonEntityBean> entities); @Override Set<String> getCurrentPrincipals(
            IPermissionOwner owner, IPermissionActivity activity, String targetKey); }
PermissionAdministrationHelper implements IPermissionAdministrationHelper { @Override public Set<String> getPrincipalsForEntities(Collection<JsonEntityBean> entities) { Set<String> principals = new HashSet<String>(); for (JsonEntityBean entity : entities) { principals.add(entity.getPrincipalString()); } return principals; }  @Autowired(required = true) void setGroupListHelper(IGroupListHelper groupListHelper); @Autowired(required = true) void setPermissionStore(IPermissionStore permissionStore); @Override boolean canEditOwner(IPerson currentUser, String owner); @Override boolean canViewOwner(IPerson currentUser, String owner); @Override boolean canEditActivity(IPerson currentUser, String activity); @Override boolean canViewActivity(IPerson currentUser, String activity); @Override boolean canEditPermission(IPerson currentUser, String target); @Override boolean canViewPermission(IPerson currentUser, String target); @Override Set<JsonEntityBean> getEntitiesForPrincipals(Collection<String> principals); @Override Set<String> getPrincipalsForEntities(Collection<JsonEntityBean> entities); @Override Set<String> getCurrentPrincipals(
            IPermissionOwner owner, IPermissionActivity activity, String targetKey);  }