@Test public void testExceptionWithNullInputStream() { InputStream inputStream = null; ErrorsMessageHeaderReader reader = new ErrorsMessageHeaderReader(); try { reader.readObject(inputStream); } catch (ErrorMessageHeaderSerializationException e) { String message = e.getMessage(); Assert.assertTrue(message.startsWith("Could not deserialize ")); } }
@Override public ErrorsMessageHeader readObject(InputStream inputStream) throws ErrorMessageHeaderSerializationException { ObjectMapper mapper = new ObjectMapper(); try { return mapper.readValue(inputStream, ErrorsMessageHeader.class); } catch (Exception e) { String message = "Could not deserialize input into a List of " + ErrorMessageHeader.class.getName() + " object. Cause: " + e.getMessage(); throw new ErrorMessageHeaderSerializationException(message, e); } }
ErrorsMessageHeaderReader implements SerializationReader<ErrorsMessageHeader> { @Override public ErrorsMessageHeader readObject(InputStream inputStream) throws ErrorMessageHeaderSerializationException { ObjectMapper mapper = new ObjectMapper(); try { return mapper.readValue(inputStream, ErrorsMessageHeader.class); } catch (Exception e) { String message = "Could not deserialize input into a List of " + ErrorMessageHeader.class.getName() + " object. Cause: " + e.getMessage(); throw new ErrorMessageHeaderSerializationException(message, e); } } }
ErrorsMessageHeaderReader implements SerializationReader<ErrorsMessageHeader> { @Override public ErrorsMessageHeader readObject(InputStream inputStream) throws ErrorMessageHeaderSerializationException { ObjectMapper mapper = new ObjectMapper(); try { return mapper.readValue(inputStream, ErrorsMessageHeader.class); } catch (Exception e) { String message = "Could not deserialize input into a List of " + ErrorMessageHeader.class.getName() + " object. Cause: " + e.getMessage(); throw new ErrorMessageHeaderSerializationException(message, e); } }  }
ErrorsMessageHeaderReader implements SerializationReader<ErrorsMessageHeader> { @Override public ErrorsMessageHeader readObject(InputStream inputStream) throws ErrorMessageHeaderSerializationException { ObjectMapper mapper = new ObjectMapper(); try { return mapper.readValue(inputStream, ErrorsMessageHeader.class); } catch (Exception e) { String message = "Could not deserialize input into a List of " + ErrorMessageHeader.class.getName() + " object. Cause: " + e.getMessage(); throw new ErrorMessageHeaderSerializationException(message, e); } }  @Override ErrorsMessageHeader readObject(InputStream inputStream); @Override ErrorsMessageHeader readObject(Reader reader); @NoJavadoc ErrorsMessageHeader readObject(String content); }
ErrorsMessageHeaderReader implements SerializationReader<ErrorsMessageHeader> { @Override public ErrorsMessageHeader readObject(InputStream inputStream) throws ErrorMessageHeaderSerializationException { ObjectMapper mapper = new ObjectMapper(); try { return mapper.readValue(inputStream, ErrorsMessageHeader.class); } catch (Exception e) { String message = "Could not deserialize input into a List of " + ErrorMessageHeader.class.getName() + " object. Cause: " + e.getMessage(); throw new ErrorMessageHeaderSerializationException(message, e); } }  @Override ErrorsMessageHeader readObject(InputStream inputStream); @Override ErrorsMessageHeader readObject(Reader reader); @NoJavadoc ErrorsMessageHeader readObject(String content);  }