TextMessageBodyWriter implements MessageBodyWriter<Object> { @Override public long getSize(final Object object, final Class<?> type, final Type genericType, final Annotation[] annotations, final MediaType mediaType) { return 0; }  @Override boolean isWriteable(final Class<?> type, final Type genericType,
                               final Annotation[] annotations, final MediaType mediaType); @Override long getSize(final Object object, final Class<?> type,
                        final Type genericType, final Annotation[] annotations,
                        final MediaType mediaType); @Override void writeTo(final Object object, final Class<?> type,
                        final Type genericType, final Annotation[] annotations,
                        final MediaType mediaType,
                        final MultivaluedMap<String, Object> httpHeaders,
                        final OutputStream entityStream);  }
@Test public void shouldReturnSize0() { final TextMessageBodyWriter writer = new TextMessageBodyWriter(); final long size = writer.getSize(null, null, null, null, null); assertEquals(0L, size); }