### Question:
DMNClientServicesProxyImpl implements DMNClientServicesProxy { <T> ErrorCallback<Boolean> onError(final ServiceCallback<T> callback) { return (message, throwable) -> { callback.onError(new ClientRuntimeError(throwable)); return false; }; } @Inject  DMNClientServicesProxyImpl(final WorkspaceProjectContext projectContext,
                                      final Caller<DMNIncludedModelsService> includedModelsService,
                                      final Caller<DMNParseService> parserService,
                                      final Caller<DMNValidationService> validationService,
                                      final Caller<TimeZoneService> timeZoneService,
                                      final Caller<DataObjectsService> dataObjectsService); @Override void loadModels(final Path path,
                           final ServiceCallback<List<IncludedModel>> callback); @Override void loadNodesFromImports(final List<DMNIncludedModel> includedModels,
                                     final ServiceCallback<List<DMNIncludedNode>> callback); @Override void loadPMMLDocumentsFromImports(final Path path,
                                             final List<PMMLIncludedModel> includedModels,
                                             final ServiceCallback<List<PMMLDocumentMetadata>> callback); @Override void loadItemDefinitionsByNamespace(final String modelName,
                                               final String namespace,
                                               final ServiceCallback<List<ItemDefinition>> callback); @Override void parseFEELList(final String source,
                              final ServiceCallback<List<String>> callback); @Override void parseRangeValue(final String source,
                                final ServiceCallback<RangeValue> callback); @Override void isValidVariableName(final String source,
                                    final ServiceCallback<Boolean> callback); @Override void getTimeZones(final ServiceCallback<List<DMNSimpleTimeZone>> callback); @Override void loadDataObjects(final ServiceCallback<List<DataObject>> callback);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testOnError() { doCallRealMethod().when(clientServicesProxy).onError(any(ServiceCallback.class)); final boolean error = true; final Throwable throwable = mock(Throwable.class); doNothing().when(clientServicesProxy).warn(any()); assertFalse(clientServicesProxy.onError(serviceCallback).error(error, throwable)); verify(serviceCallback).onError(clientRuntimeErrorArgumentCaptor.capture()); assertEquals(throwable, clientRuntimeErrorArgumentCaptor.getValue().getRootCause()); }