/** Test the hasPermission() service method. */
 @Test
 public void testHasPermission() throws Exception {
   PrincipalContract userChew = identityManagementService.getPrincipalByPrincipalName("chew");
   ProposalDevelopmentDocument doc = createProposal("Proposal-6", "000001");
   kraAuthService.addDocumentLevelRole(
       userChew.getPrincipalId(), RoleConstants.NARRATIVE_WRITER, doc);
   assertTrue(
       kraAuthService.hasPermission(
           userChew.getPrincipalId(), doc, PermissionConstants.MODIFY_NARRATIVE));
   assertFalse(
       kraAuthService.hasPermission(
           userChew.getPrincipalId(), doc, PermissionConstants.MODIFY_BUDGET));
 }