@Test
public void testAddViolations() {

    presenter.violations.clear();
    ConstraintViolationImpl v1 = mock(ConstraintViolationImpl.class);
    List<ConstraintViolation> _violations = new ArrayList<ConstraintViolation>();
    _violations.add(v1);
    presenter.addViolations(_violations);
    assertTrue(presenter.hasErrors());
    verify(view, times(0)).clearButtons();
    verify(view, times(0)).addButton(anyString(), anyString(), anyBoolean(), any(Command.class));
    verify(view, times(0)).add(any(IsWidget.class));
    verify(view, times(0)).init(presenter);
    verify(view, times(0)).clearView();
}