### Question:
PermissionsHelper { public boolean hasEditAccess(AccessGroupSet principals, BriefObjectMetadata metadata) { notNull(principals, "Requires agent principals"); notNull(metadata, "Requires metadata object"); return accessControlService.hasAccess(metadata.getPid(), principals, editDescription); } PermissionsHelper(); boolean hasOriginalAccess(AccessGroupSet principals, BriefObjectMetadata metadata); boolean hasThumbnailAccess(AccessGroupSet principals, BriefObjectMetadata metadata); boolean hasImagePreviewAccess(AccessGroupSet principals, BriefObjectMetadata metadata); boolean hasDescriptionAccess(AccessGroupSet principals, BriefObjectMetadata metadata); boolean hasDatastreamAccess(AccessGroupSet principals, DatastreamType datastream,
            BriefObjectMetadata metadata); boolean hasEditAccess(AccessGroupSet principals, BriefObjectMetadata metadata); boolean allowsPublicAccess(BriefObjectMetadata metadata); AccessControlService getAccessControlService(); void setAccessControlService(AccessControlService accessControlService);  }### Answer:
@Test public void testHasEditAccess() { assignPermission(editDescription, true); assertTrue(helper.hasEditAccess(principals, mdObject)); }
@Test public void testDoesNotHaveEditAccess() { assignPermission(editDescription, false); assertFalse(helper.hasEditAccess(principals, mdObject)); }
@Test(expected = IllegalArgumentException.class) public void testHasEditAccessNoPrincipals() { assignPermission(editDescription, true); assertTrue(helper.hasEditAccess(null, mdObject)); }