### Question:
AttachmentExportMapper { public ResourceOutput transform(final OutputResource resource) { return new ResourceOutput() { @Override public InputStream getStream() throws IOException { return resource.getStream(); } }; }  ResourceOutput transform(final OutputResource resource);  }### Answer:
@Test public void testTransform() throws Exception { when(mOutputResource.getStream()).thenReturn(mStream); ResourceOutput result = mapper.transform(mOutputResource); assertThat(result.getStream(), is(mStream)); }