StreamResource extends AbstractStreamResource { public ContentTypeResolver getContentTypeResolver() { return resolver; } StreamResource(String name, StreamResourceWriter writer);  StreamResource(String name, InputStreamFactory factory); StreamResourceWriter getWriter(); StreamResource setContentTypeResolver(ContentTypeResolver resolver); StreamResource setContentType(String contentType); ContentTypeResolver getContentTypeResolver(); @Override String getName();  }
@Test public void getDefaultContentTypeResolver() { StreamResource resource = new StreamResource("foo", () -> makeEmptyStream()); ContentTypeResolver resolver = resource.getContentTypeResolver(); Assert.assertNotNull(resolver); assertContentType(resource, resolver); }