StreamConverter implements GenericHttpMessageConverter<Stream<T>> { @Override public List<MediaType> getSupportedMediaTypes() { return Collections.unmodifiableList(supportedMediaTypes); }  @Override boolean canRead(final Class<?> clazz, final MediaType mediaType); @Override boolean canRead(final Type type, @Nullable final Class<?> contextClass, final MediaType mediaType); @Override List<MediaType> getSupportedMediaTypes(); @Override Stream<T> read(final Class<? extends Stream<T>> clazz, final HttpInputMessage inputMessage); @Override Stream<T> read(final Type type, final Class<?> contextClass, final HttpInputMessage inputMessage); @Override boolean canWrite(final Class<?> clazz, final MediaType mediaType); boolean canWrite(final Type type, final Class<?> clazz, final MediaType mediaType); @Override void write(final Stream<T> t, final MediaType mediaType, final HttpOutputMessage message); void write(final Stream<T> t, final Type type, final MediaType mediaType, final HttpOutputMessage message);  }
@Test void shouldSupportMediaTypes() { final List<MediaType> medias = streamConverter().getSupportedMediaTypes(); assertThat(medias, hasItem(APPLICATION_X_JSON_STREAM)); assertThat(medias, hasItem(APPLICATION_JSON_SEQ)); }