/**
   * Accuracy test for the method <code>getSpecificationReview(TCSubject,
   * long)</code>.
   *
   * @throws Exception to JUnit
   */
  public void testGetSpecificationReview() throws Exception {
    TCSubject sub = new TCSubject(null, 1L);

    try {
      assertNull(service.getSpecificationReview(sub, 1001L));
    } catch (Exception e) {
      fail("No exception should be thrown!");
    }
  }
  /**
   * Accuracy test for the method <code>submitSpecificationAsFile(TCSubject,
   * long, String)</code>.
   *
   * @throws Exception to JUnit
   */
  public void testSubmitSpecificationAsFile() throws Exception {
    TCSubject sub = new TCSubject(null, 1L);

    try {
      service.submitSpecificationAsFile(sub, 1L, "test_files/accuracytests/test.file");
    } catch (Exception e) {
      fail("No exception should be thrown!");
    }
  }
  /**
   * Accuracy test for the method <code>submitSpecificationAsString(TCSubject,
   * long, String)</code>.
   *
   * @throws Exception to JUnit
   */
  public void testSubmitSpecificationAsString() throws Exception {
    TCSubject sub = new TCSubject(null, 1L);

    try {
      service.submitSpecificationAsString(sub, 1, "String Submission");
    } catch (Exception e) {
      fail("No exception should be thrown!");
    }
  }
  /**
   * Accuracy test for the method <code>
   * scheduleSpecificationReview(TCSubject tcSubject, long projectId, Date reviewStartDate)</code> .
   *
   * @throws Exception to JUnit
   */
  public void testScheduleSpecificationReview1() throws Exception {
    Date date = new Date();
    TCSubject sub = new TCSubject(null, 1L);

    try {
      service.scheduleSpecificationReview(sub, 1, date);
    } catch (Exception e) {
      fail("No exception should be thrown!");
    }
  }
 /**
  * Set the test environment.
  *
  * @throws Exception to JUnit
  */
 protected void setUp() throws Exception {
   super.setUp();
   service = new MockSpecificationReviewServiceBean();
   setPrivateField(
       SpecificationReviewServiceBean.class,
       service,
       "loggerName",
       "specification_review_service_log");
   setPrivateField(
       SpecificationReviewServiceBean.class,
       service,
       "projectServices",
       new ProjectServicesBean());
   setPrivateField(
       SpecificationReviewServiceBean.class,
       service,
       "mockSubmissionFilePath",
       "test_files/mock_submission/");
   setPrivateField(
       SpecificationReviewServiceBean.class, service, "mockSubmissionFileName", "mock_rs.rtf");
   setPrivateField(
       SpecificationReviewServiceBean.class,
       service,
       "searchBundleManageNamespace",
       "com.topcoder.search.builder.Upload_Resource_Search");
   setPrivateField(
       SpecificationReviewServiceBean.class,
       service,
       "reviewManagerClassName",
       "com.topcoder.management.review.DefaultReviewManager");
   setPrivateField(
       SpecificationReviewServiceBean.class,
       service,
       "scorecardManagerClassName",
       "com.topcoder.management.scorecard.ScorecardManagerImpl");
   setPrivateField(
       SpecificationReviewServiceBean.class,
       service,
       "uploadExternalServicesClassName",
       "com.cronos.onlinereview.services.uploads.impl.DefaultUploadExternalServices");
   setPrivateField(
       SpecificationReviewServiceBean.class,
       service,
       "dbConnectionFactoryClassName",
       "com.topcoder.db.connectionfactory.DBConnectionFactoryImpl");
   setPrivateField(
       SpecificationReviewServiceBean.class,
       service,
       "dbConnectionFactoryNamespace",
       "com.topcoder.db.connectionfactory.DBConnectionFactoryImpl");
   service.initialize();
 }
  /**
   * Accuracy test for the method <code>
   * scheduleSpecificationReview(TCSubject tcSubject, long projectId, Date reviewStartDate)</code> .
   *
   * @throws Exception to JUnit
   */
  public void testScheduleSpecificationReview3() throws Exception {
    Date date = new Date(System.currentTimeMillis() + DAY);
    long id = 1L;
    TCSubject sub = new TCSubject(null, id);

    service.scheduleSpecificationReview(sub, 1, date);

    Project project = MockPhaseManager.getPhases().get("" + id);
    assertNotNull(project);

    Phase submissionPhase = getSubmissionPhase(project);
    assertNotNull(submissionPhase);
    assertEquals(PhaseStatus.SCHEDULED, submissionPhase.getPhaseStatus());
  }
 /**
  * Accuracy test for the method <code>getOpenSpecificationReviewPositions(TCSubject)</code> .
  *
  * @throws Exception to JUnit
  */
 public void testGetOpenSpecificationReviewPositions() throws Exception {
   TCSubject sub = new TCSubject(null, 1L);
   List<Long> positions = service.getOpenSpecificationReviewPositions(sub);
   assertNotNull(positions);
   assertTrue(positions.size() > 0);
 }
 /**
  * Accuracy test for the method <code>getSpecificationReview(TCSubject,
  * long)</code>.
  *
  * @throws Exception to JUnit
  */
 public void testGetSpecificationReview1() throws Exception {
   TCSubject sub = new TCSubject(null, 1L);
   assertNull(service.getSpecificationReview(sub, 1001L));
 }
 /**
  * Accuracy test for the method <code>getSpecificationReviewStatus(TCSubject,
  * long)</code>.
  *
  * @throws Exception to JUnit
  */
 public void testGetSpecificationReviewStatus2() throws Exception {
   TCSubject sub = new TCSubject(null, 1L);
   long magicId = 1234L;
   SpecificationReviewStatus status = service.getSpecificationReviewStatus(sub, magicId);
   assertNull(status);
 }
 /**
  * Accuracy test for the method <code>getSpecificationReviewStatus(TCSubject,
  * long)</code>.
  *
  * @throws Exception to JUnit
  */
 public void testGetSpecificationReviewStatus1() throws Exception {
   TCSubject sub = new TCSubject(null, 1L);
   SpecificationReviewStatus status = service.getSpecificationReviewStatus(sub, 1L);
   assertNotNull(status);
   assertEquals(SpecificationReviewStatus.WAITING_FOR_FIXES, status);
 }