### Question:
OkCancelDialog extends Window { public void setCancelCaption(String cancelCaption) { if (cancelButton != null) { cancelButton.setCaption(requireNonNull(cancelCaption, "cancelCaption must not be null")); } else { throw new IllegalStateException("Dialog does not have a cancel button"); } } protected  OkCancelDialog(String caption, Handler okHandler, Handler cancelHandler,
            ButtonOption buttonOption, Component... contentComponents); @Deprecated  OkCancelDialog(String caption); @Deprecated  OkCancelDialog(String caption, Handler okHandler); @Deprecated  OkCancelDialog(String caption, Handler okHandler, ButtonOption buttonOption); @Deprecated  OkCancelDialog(String caption, Component content, Handler okHandler, ButtonOption buttonOption); @SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", justification = "yeah, we know...") @Override void setContent(@CheckForNull Component content); void setSize(String width, String height); MessageList validate(); ValidationService getValidationService(); void setValidationService(ValidationService validationService); void setBeforeOkHandler(Handler beforeOkHandler); OkCancelDialog open(); void addContent(Component c); void addContent(Component c, float expandRatio); boolean isOkPressed(); ValidationDisplayState getValidationDisplayState(); boolean isCancelPressed(); String getOkCaption(); void setOkCaption(String okCaption); String getCancelCaption(); void setCancelCaption(String cancelCaption); static Builder builder(String caption);  }### Answer:
@Test public void testSetCancelCaption() { OkCancelDialog dialog = OkCancelDialog.builder("").build(); dialog.setCancelCaption("cancel it"); assertThat(dialog.getCancelCaption(), is("cancel it")); assertThat(DialogTestUtil.getButtons(dialog).get(1).getCaption(), is("cancel it")); }