@Test
public void testShowErrors() throws Exception {

    EditorError e1 = mockEditorError(presenter, "m1");
    EditorError e2 = mockEditorError(presenter, "m2");
    List<EditorError> errors = new ArrayList<EditorError>(2);
    errors.add(e1);
    errors.add(e2);
    presenter.showErrors(errors);
    final ArgumentCaptor<SafeHtml> errorSafeHtmlCaptor =  ArgumentCaptor.forClass(SafeHtml.class);
    verify(view, times(1)).showError(errorSafeHtmlCaptor.capture());
    verify(view, times(0)).init(presenter);
    verify(view, times(0)).clearError();
    verify(view, times(0)).setValue(anyBoolean());
    final SafeHtml value = errorSafeHtmlCaptor.getValue();
    Assert.assertEquals("m1\nm2", value.asString());
}