@Test public void innerErrorComplexArray() throws Exception { InputStream in = StringHelper.encapsulate(JSON_ERROR_DOCUMENT_INNER_ERROR_COMPLEX_ARRAY); ODataErrorContext error = jedc.readError(in); assertEquals("Wrong content type", "application/json", error.getContentType()); assertEquals("Wrong message", "Message", error.getMessage()); assertEquals("Wrong error code", "ErrorCode", error.getErrorCode()); assertEquals("Wrong inner error", "{\"innerArray\":[\"More Inner Error\"\"Second\"]}", error.getInnerError()); }
public ODataErrorContext readError(final InputStream errorDocument) throws EntityProviderException { JsonReader reader = createJsonReader(errorDocument); try { return parseJson(reader); } catch (IOException e) { throw new EntityProviderException( EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getMessage()), e); } }
JsonErrorDocumentDeserializer { public ODataErrorContext readError(final InputStream errorDocument) throws EntityProviderException { JsonReader reader = createJsonReader(errorDocument); try { return parseJson(reader); } catch (IOException e) { throw new EntityProviderException( EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getMessage()), e); } } }
JsonErrorDocumentDeserializer { public ODataErrorContext readError(final InputStream errorDocument) throws EntityProviderException { JsonReader reader = createJsonReader(errorDocument); try { return parseJson(reader); } catch (IOException e) { throw new EntityProviderException( EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getMessage()), e); } }  }
JsonErrorDocumentDeserializer { public ODataErrorContext readError(final InputStream errorDocument) throws EntityProviderException { JsonReader reader = createJsonReader(errorDocument); try { return parseJson(reader); } catch (IOException e) { throw new EntityProviderException( EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getMessage()), e); } }  ODataErrorContext readError(final InputStream errorDocument); }
JsonErrorDocumentDeserializer { public ODataErrorContext readError(final InputStream errorDocument) throws EntityProviderException { JsonReader reader = createJsonReader(errorDocument); try { return parseJson(reader); } catch (IOException e) { throw new EntityProviderException( EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getMessage()), e); } }  ODataErrorContext readError(final InputStream errorDocument);  }