@Test(expected = EntityProviderException.class) public void invalidErrorDocument() throws EntityProviderException { InputStream in = StringHelper.encapsulate(JSON_ERROR_DOCUMENT_INVALID_CONTENT); try { jedc.readError(in); fail("Expected exception was not thrown"); } catch (EntityProviderException e) { assertEquals(EntityProviderException.MISSING_PROPERTY, e.getMessageReference()); throw e; } }
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); } }
JsonErrorDocumentConsumer { 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); } } }
JsonErrorDocumentConsumer { 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); } }  }
JsonErrorDocumentConsumer { 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); }
JsonErrorDocumentConsumer { 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);  }