TextMessageBodyWriter implements MessageBodyWriter<Object> { @Override public boolean isWriteable(final Class<?> type, final Type genericType, final Annotation[] annotations, final MediaType mediaType) { return true; }  @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 shouldHandleAllObjectTypes() { final TextMessageBodyWriter writer = new TextMessageBodyWriter(); assertTrue(writer.isWriteable(null, null, null, null)); assertTrue(writer.isWriteable(String.class, null, null, null)); assertTrue(writer.isWriteable(Object.class, null, null, null)); }