ViewableWriter implements MessageBodyWriter<Viewable> { @Override public long getSize(Viewable viewable, Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType) { return -1; }  @Override boolean isWriteable(Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType); @Override long getSize(Viewable viewable, Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType); @Override void writeTo(Viewable viewable, Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType,
                        MultivaluedMap<String, Object> headers, OutputStream out); static final String CONTENT_TYPE; static final Charset UTF8; }
@Test public void testGetSize() { ViewableWriter writer = new ViewableWriter(); assertEquals(-1, writer.getSize(null, null, null, new Annotation[] {}, MediaType.WILDCARD_TYPE)); }