### Question:
ObjectAclFactory implements AclFactory { @Override public List<RoleAssignment> getPatronRoleAssignments(PID pid) { return getRoleAssignments(pid, false); } ObjectAclFactory(); void init(); @Override Map<String, Set<String>> getPrincipalRoles(PID pid); @Override List<RoleAssignment> getStaffRoleAssignments(PID pid); @Override List<RoleAssignment> getPatronRoleAssignments(PID pid); @Override List<RoleAssignment> getPatronAccess(PID pid); @Override Date getEmbargoUntil(PID pid); @Override boolean isMarkedForDeletion(PID pid); long getCacheTimeToLive(); void setCacheTimeToLive(long cacheTimeToLive); long getCacheMaxSize(); void setCacheMaxSize(long cacheMaxSize); void setRepositoryObjectCacheLoader(RepositoryObjectCacheLoader repositoryObjectCacheLoader);  }### Answer:
@Test public void testGetPatronRolesSingleRoleValid() { objResc.addLiteral(CdrAcl.canViewOriginals, USER_PRINC); List<RoleAssignment> assignments = aclFactory.getPatronRoleAssignments(pid); assertEquals(1, assignments.size()); RoleAssignment assignment = assignments.iterator().next(); assertEquals(pid.getId(), assignment.getAssignedTo()); assertEquals(CdrAcl.canViewOriginals, assignment.getRole().getProperty()); assertEquals(USER_PRINC, assignment.getPrincipal()); }
@Test public void testGetPatronRolesOnlyStaffAssignments() { objResc.addLiteral(CdrAcl.canManage, USER_PRINC); List<RoleAssignment> assignments = aclFactory.getPatronRoleAssignments(pid); assertTrue(assignments.isEmpty()); }
@Test public void testGetPatronRolesNoAssignments() { List<RoleAssignment> assignments = aclFactory.getPatronRoleAssignments(pid); assertTrue(assignments.isEmpty()); }