### Question:
GsonMessageBodyReaderWriter implements MessageBodyReader<Object>, MessageBodyWriter<Object> { @Override public long getSize(Object src, Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType) { return -1; } GsonMessageBodyReaderWriter(); @Override boolean isReadable(Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType); @Override Object readFrom(Class<Object> objectClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> stringStringMultivaluedMap, InputStream inputStream); @Override boolean isWriteable(Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType); @Override long getSize(Object src, Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType); @Override void writeTo(Object src, Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> stringObjectMultivaluedMap, OutputStream outputStream);  }### Answer:
@Test public void testGetSize() { assertEquals(-1, provider.getSize(new MockObject(), MockObject.class, MockObject.class.getGenericSuperclass(), new Annotation[]{}, MediaType.APPLICATION_JSON_TYPE)); }