@Test
@SuppressWarnings("unchecked")
public void testLoadContentError() {
ArgumentCaptor<ServiceCallback> callbackArgumentCaptor = forClass(ServiceCallback.class);
tested.loadContent();
verify(projectDiagramServices,
times(1)).getByPath(eq(path),
callbackArgumentCaptor.capture());
callbackArgumentCaptor.getValue().onError(new ClientRuntimeError(new DefinitionNotFoundException()));
verify(placeManager,
times(1)).forceClosePlace(any(PathPlaceRequest.class));
ArgumentCaptor<Consumer> consumerArgumentCaptor = forClass(Consumer.class);
verify(diagramClientErrorHandler,
times(1)).handleError(any(ClientRuntimeError.class),
consumerArgumentCaptor.capture());
consumerArgumentCaptor.getValue().accept("error message");
verify(errorPopupPresenter,
times(1)).showMessage("error message");
}