PropertyButtonWidgetImpl extends Composite implements PropertyButtonWidget, ClickHandler { @Override public void setEnable(boolean isEnable) { this.isEnable = isEnable; if (isEnable) { button.removeStyleName(resources.runnerCss().opacityButton()); } else { button.addStyleName(resources.runnerCss().opacityButton()); } } @Inject  PropertyButtonWidgetImpl(RunnerLocalizationConstant locale,
                                    RunnerResources resources,
                                    @Assisted String title,
                                    @Assisted Background background); @Override void setEnable(boolean isEnable); @Override void setDelegate(@NotNull ActionDelegate delegate); @Override void onClick(ClickEvent event);  }
@Test public void buttonShouldBeEnable() { reset(buttonWidget.button); buttonWidget.setEnable(true); verify(buttonWidget.button).removeStyleName(TEXT); }
@Test public void buttonShouldBeDisable() { reset(buttonWidget.button); buttonWidget.setEnable(false); verify(buttonWidget.button).addStyleName(TEXT); }