### Question:
OkCancelDialog extends Window { public static Builder builder(String caption) { return new Builder(caption); } 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(); static Builder builder(String caption);  }### Answer:
@Test public void testContent() { Label content1 = new Label("1"); Label content2 = new Label("2"); OkCancelDialog dialog = OkCancelDialog.builder("caption") .content(content1, content2) .build(); assertThat(DialogTestUtil.getContents(dialog), contains(content1, content2)); }
@Test public void testButtonOption() { OkCancelDialog dialog = OkCancelDialog.builder("").buttonOption(ButtonOption.OK_ONLY).build(); assertThat(DialogTestUtil.getButtons(dialog), hasSize(1)); }