@Test
 public void saveBonusTest() {
   expectedImsBonusEntity.setSearchFieldText(existingTemplate);
   expectedImsBonusEntity.setSelectedTemplateName(existingTemplate);
   expectedImsBonusEntity.setAvailableTemplates(Arrays.asList(existingTemplate));
   expectedImsBonusEntity.setSourceForBonusCalcAmount("No amount required");
   // WHEN
   imsBonusPage =
       (ImsBonusPage)
           testGroupsPage.addAction(testGroupToTest, expectedImsBonusEntity.getAction());
   imsBonusPage.setAllFields(expectedImsBonusEntity);
   testGroupsPage = (TestGroupsPage) imsBonusPage.clickOk(true);
   campaignDetailsPage = testGroupsPage.clickSave();
   activityTab = campaignDetailsPage.openActivityTab();
   testGroupsPage = activityTab.clickActionsWithTestGroups();
   // THEN
   assertEquals(expectedImsBonusEntity.getAction(), testGroupsPage.getAction(testGroupToTest));
   assertEquals(
       expectedImsBonusEntity.getSelectedTemplateName()
           + " - Amount Source: "
           + expectedImsBonusEntity.getSourceForBonusCalcAmount(),
       testGroupsPage.getSummary(testGroupToTest));
   activityTab = campaignTabs.openActivityTab();
   testGroupsPage = activityTab.clickActionsWithTestGroups();
   imsBonusPage = (ImsBonusPage) testGroupsPage.clickEdit(testGroupToTest);
   actualImsBonusEntity = imsBonusPage.getAllFields();
   assertObjectsEquals(expectedImsBonusEntity, actualImsBonusEntity);
 }
 @Test
 public void deleteBonusTest() {
   expectedImsBonusEntity.setSearchFieldText(existingTemplate);
   expectedImsBonusEntity.setSelectedTemplateName(existingTemplate);
   expectedImsBonusEntity.setAvailableTemplates(Arrays.asList(existingTemplate));
   expectedImsBonusEntity.setSourceForBonusCalcAmount("No amount required");
   // WHEN
   imsBonusPage =
       (ImsBonusPage)
           testGroupsPage.addAction(testGroupToTest, expectedImsBonusEntity.getAction());
   imsBonusPage.setAllFields(expectedImsBonusEntity);
   testGroupsPage = (TestGroupsPage) imsBonusPage.clickOk(true);
   campaignDetailsPage = testGroupsPage.clickSave();
   activityTab = campaignDetailsPage.openActivityTab();
   testGroupsPage = activityTab.clickActionsWithTestGroups();
   testGroupsPage.clickDelete(testGroupToTest);
   // THEN
   assertTrue(
       testGroupsPage.getAction(testGroupToTest).equals("Add Action"),
       "IMS Bonus is not disappeared from test group after deleting.");
   campaignDetailsPage = testGroupsPage.clickSave();
   activityTab = campaignDetailsPage.openActivityTab();
   testGroupsPage = activityTab.clickActionsWithTestGroups();
   assertTrue(
       testGroupsPage.getAction(testGroupToTest).equals("Add Action"),
       "IMS Bonus is not disappeared from test group after deleting.");
 }