### Question:
ValidatingJacksonJsonProvider implements MessageBodyReader<Object>, MessageBodyWriter<Object> { @Override public void writeTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException { delegate.writeTo(t, type, genericType, annotations, mediaType, httpHeaders, entityStream); } @Inject  ValidatingJacksonJsonProvider(JacksonJsonProvider delegate, Validator validator); @Override Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations,
      MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream); @Override void writeTo(Object t, Class<?> type, Type genericType, Annotation[] annotations,
      MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream); @Override boolean isWriteable(Class<?> type, Type genericType,
      Annotation[] annotations, MediaType mediaType); @Override long getSize(Object t, Class<?> type, Type genericType,
      Annotation[] annotations, MediaType mediaType); @Override boolean isReadable(Class<?> type, Type genericType,
      Annotation[] annotations, MediaType mediaType);  }### Answer:
@Test public void writeTo() throws Exception { Object value = createMock(Object.class); @SuppressWarnings("unchecked") MultivaluedMap<String, Object> httpHeaders = createMock(MultivaluedMap.class); OutputStream entityStream = createMock(OutputStream.class); delegate.writeTo(value, type, genericType, annotations, mediaType, httpHeaders, entityStream); replayAll(); provider.writeTo(value, type, genericType, annotations, mediaType, httpHeaders, entityStream); }