@Test
 @UseWithField(field = "booleanValue", valuesFrom = FROM_FIELD, value = "booleans")
 public void testShowApplyButton() {
   calendarAttributes.set(CalendarAttributes.showApplyButton, booleanValue);
   PopupFooterControls fc = popupCalendar.openPopup().getFooterControls();
   if (booleanValue) {
     assertVisible(fc.getApplyButtonElement());
   } else {
     assertNotVisible(fc.getApplyButtonElement());
     setCurrentDateWithCalendarsTodayButtonAction.perform();
     DateTime inputTime =
         dateTimeFormatter.parseDateTime(popupCalendar.getInput().getStringValue());
     assertEquals(inputTime.getDayOfMonth(), todayMidday.getDayOfMonth());
     assertEquals(inputTime.getMonthOfYear(), todayMidday.getMonthOfYear());
     assertEquals(inputTime.getYear(), todayMidday.getYear());
   }
 }
  @Test
  @UseWithField(field = "booleanValue", valuesFrom = FROM_FIELD, value = "booleans")
  @Templates("plain")
  public void testShowFooter() {
    setCurrentDateWithCalendarsTodayButtonAction.perform();
    calendarAttributes.set(CalendarAttributes.showFooter, booleanValue);
    PopupFooterControls fc = popupCalendar.openPopup().getFooterControls();
    if (booleanValue) {
      assertTrue(fc.isVisible(), "Footer elements should be visible, when footer is rendered");
      assertListOfWebElementsVisible(
          Arrays.asList(
              fc.getApplyButtonElement(),
              fc.getCleanButtonElement(),
              fc.getTimeEditorOpenerElement(),
              fc.getTodayButtonElement()));

    } else {
      assertFalse(
          fc.isVisible(), "Footer elements should not be visible, when footer is not rendered");
    }
  }