@Test
public void testClear() {

    presenter.dataSetDef = this.dataSetDef;
    final Command c = mock(Command.class);
    presenter.flushCommand = c;
    presenter.stepValidator = c;
    presenter.clear();
    assertNull(presenter.getDataSetDef());
    assertNull(presenter.flushCommand);
    assertNull(presenter.stepValidator);
    assertTrue(presenter.violations.isEmpty());
    verify(view, times(1)).clearView();
    verify(view, times(0)).init(presenter);
    verify(view, times(0)).add(any(IsWidget.class));
    verify(view, times(0)).addButton(anyString(), anyString(), anyBoolean(), any(Command.class));
    verify(view, times(0)).clearButtons();
}