@Override
 public void close(Protocol protocol, ProtocolGenericActionBean actionBean) throws Exception {
   if (ProtocolActionType.REQUEST_TO_CLOSE.equals(
       protocol.getLastProtocolAction().getProtocolActionType().getProtocolActionTypeCode())) {
     // if previous action is request to close then the new status is closed by investigator
     performGenericAction(
         protocol,
         actionBean,
         ProtocolActionType.CLOSED_ADMINISTRATIVELY_CLOSED,
         ProtocolStatus.CLOSED_BY_INVESTIGATOR);
   } else {
     // else closed administratively
     performGenericAction(
         protocol,
         actionBean,
         ProtocolActionType.CLOSED_ADMINISTRATIVELY_CLOSED,
         ProtocolStatus.CLOSED_ADMINISTRATIVELY);
   }
 }
  @Test
  public void testProcessApproveCommitteeDecision() throws Exception {
    Protocol protocol = getProtocolAssignedToAgenda();

    CommitteeDecision committeeDecision =
        getMockCommitteeDecisionBean(CommitteeDecisionMotionType.APPROVE);
    service.processCommitteeDecision(protocol, committeeDecision);

    ProtocolAction lastAction = protocol.getLastProtocolAction();
    assertNotNull(lastAction);
    assertEquals(
        ProtocolActionType.RECORD_COMMITTEE_DECISION, lastAction.getProtocolActionTypeCode());
    ProtocolSubmission submission = protocol.getProtocolSubmission();
    assertNotNull(submission);
    assertEquals(
        CommitteeDecisionMotionType.APPROVE, submission.getCommitteeDecisionMotionTypeCode());
    assertEquals(YES_COUNT, submission.getYesVoteCount());
    assertEquals(NO_COUNT, submission.getNoVoteCount());
    assertEquals(ABSTAIN_COUNT, submission.getAbstainerCount());
    assertEquals(RECUSED_COUNT, submission.getRecusedCount());
    assertEquals(VOTING_COMMENTS, submission.getVotingComments());
  }