@SuppressWarnings(
      "PMD.SignatureDeclareThrowsException") // one of the dependent methods throws Exception
  @Test(enabled = true) // TODO js - temporarily disabled broken test
  public void checkThatPreviewEditButtonWorks() throws Exception {
    SubmitFormParameters formParameters = getFormParameters();
    CollectionSheetEntrySelectPage selectPage =
        new CollectionSheetEntryTestHelper(selenium)
            .loginAndNavigateToCollectionSheetEntrySelectPage();
    selectPage.verifyPage();
    CollectionSheetEntryEnterDataPage enterDataPage =
        selectPage.submitAndGotoCollectionSheetEntryEnterDataPage(formParameters);
    CollectionSheetEntryPreviewDataPage previewDataPage =
        enterDataPage.submitAndGotoCollectionSheetEntryPreviewDataPage();

    previewDataPage.verifyPage(formParameters);
    previewDataPage.editAndGoToCollectionSheetEntryEnterDataPage();
  }
 @SuppressWarnings(
     "PMD.SignatureDeclareThrowsException") // one of the dependent methods throws Exception
 private void checkForValueObjectConversionErrorWhenEnteringInvalidDate(
     SubmitFormParameters invalidFormParameters, SubmitFormParameters validFormParameters)
     throws Exception {
   CollectionSheetEntrySelectPage selectPage =
       new CollectionSheetEntryTestHelper(selenium)
           .loginAndNavigateToCollectionSheetEntrySelectPage();
   selectPage.verifyPage();
   boolean onlyTypeIfFieldIsEmpty = true;
   boolean waitForPageToLoad = true;
   selectPage.submitAndGotoCollectionSheetEntryEnterDataPageWithoutVerifyingPage(
       invalidFormParameters, onlyTypeIfFieldIsEmpty, waitForPageToLoad);
   CollectionSheetEntrySelectPage collectionSheetEntrySelectPageWithError =
       new CollectionSheetEntrySelectPage(selenium);
   collectionSheetEntrySelectPageWithError.verifyPage();
   Assert.assertTrue(collectionSheetEntrySelectPageWithError.isErrorMessageDisplayed());
   onlyTypeIfFieldIsEmpty = false;
   waitForPageToLoad = false;
   CollectionSheetEntryEnterDataPage enterDataPage =
       collectionSheetEntrySelectPageWithError.submitAndGotoCollectionSheetEntryEnterDataPage(
           validFormParameters, onlyTypeIfFieldIsEmpty, waitForPageToLoad);
   enterDataPage.verifyPage();
 }