### Question:
FailedItemMarshaller implements BytesWriter<ItemSource>, BytesReader<ItemSource>,
        ReadResolvable<FailedItemMarshaller> { @Override public void write(Bytes out, @NotNull ItemSource toWrite) { try { objectMapper.writeValue(out.outputStream(), toWrite); } catch (Exception e) { LOG.error( "{} serialization failed: {}", FailedItemSource.class.getSimpleName(), e.getMessage() ); } } FailedItemMarshaller(); ObjectMapper objectMapper(); @Override void writeMarshallable(@NotNull WireOut wire); @Override void readMarshallable(@NotNull WireIn wire); @Override FailedItemMarshaller readResolve(); @Override ItemSource read(Bytes in, @Nullable ItemSource using); @Override void write(Bytes out, @NotNull ItemSource toWrite);  }### Answer:
@Test public void writeDoesNotRethrow() { FailedItemMarshaller failedItemMarshaller = new FailedItemMarshaller(); Bytes bytes = mock(Bytes.class); RuntimeException expectedException = spy(new RuntimeException("test exception")); when(bytes.outputStream()).thenThrow(expectedException); failedItemMarshaller.write(bytes, mock(ItemSource.class)); verify(expectedException, times(1)).getMessage(); }