### Question:
JobConfigurationHttpMessageConverter implements HttpMessageConverter<JobConfiguration> { @Override public JobConfiguration read(Class<? extends JobConfiguration> clazz, HttpInputMessage inputMessage) throws IOException { final ByteArrayOutputStream output = new ByteArrayOutputStream(); Streams.copy(inputMessage.getBody(), output); return new JobConfiguration() { @Override public InputStream getInputStream() throws IOException { return new ByteArrayInputStream(output.toByteArray()); } }; }  @Override boolean canRead(Class<?> clazz); @Override boolean canWrite(Class<?> clazz); @Override JobConfiguration read(Class<? extends JobConfiguration> clazz, HttpInputMessage inputMessage); @Override void write(JobConfiguration t, String contentType, HttpOutputMessage outputMessage);  }### Answer:
@Test public void read() throws Exception { HttpInputMessage inputMessage = new MockHttpInputMessage("<freeStyleProject></freeStyleProject>"); JobConfiguration jobConfiguration = converter.read(JobConfiguration.class, inputMessage); Assert.assertEquals("<freeStyleProject></freeStyleProject>", Streams.toString(jobConfiguration.getInputStream())); }