@Test
  public void testGenerateTasks_SponsorRoleNeedsVerification() throws Exception {
    Set<String> groupNames = Sets.newHashSet();

    List<Task> tasks = generator.generateTasks(sponsor, groupNames);

    checkForOnlyTask(tasks, SPONSOR_ROLE_AWAITING_VERIFICATION_TASK_TITLE);
  }
  @Test
  public void testGenerateTasks_InReviewRegistration() throws Exception {
    InvestigatorRegistration registration =
        RegistrationFactory.getInstance().createInvestigatorRegistration(IN_REVIEW);
    setUpMockRegistrationServiceToReturnRegistration(registration);

    List<Task> tasks = generator.generateTasks(sponsor, groupNames);

    checkForOnlyTask(tasks, REGISTRATION_IN_REVIEW_TASK_TITLE, registration);
  }
  @Test
  public void testGenerateTasks_RegistrationReadyForApproval() throws Exception {
    InvestigatorRegistration registration =
        RegistrationFactory.getInstance().createInvestigatorRegistration(ACCEPTED);
    setUpMockRegistrationServiceToReturnRegistration(registration);
    registration.getProtocol().setSponsor(sponsorOrganization);

    List<Task> tasks = generator.generateTasks(sponsor, groupNames);

    checkForOnlyTask(tasks, REGISTRATION_PACKET_AWAITING_APPROVAL_TITLE, registration);
  }