@Test
public void testMakeExpressionEditorButton() {

    final HasConstraints hasConstraints = mock(HasConstraints.class);
    final FormStylePopup popup = mock(FormStylePopup.class);
    final Button button = mock(Button.class);
    final ClickHandler clickHandler = mock(ClickHandler.class);
    doReturn(button).when(popupCreator).makeExpressionEditorButton();
    doReturn(clickHandler).when(popupCreator).onExpressionEditorButtonClick(hasConstraints, popup);
    popupCreator.makeExpressionEditorButton(hasConstraints, popup);
    verify(button).addClickHandler(clickHandler);
}