ManifestResource implements CommonRestResource, SingletonRestResource { @GET @Produces("application/json") public void mainfest(@Suspended AsyncResponse asyncResponse, @Context ServletContext context) { ReactiveSeq.of("/META-INF/MANIFEST.MF") .map(url -> context.getResourceAsStream(url)) .map(this::getManifest) .foldFuture(WorkerThreads.ioExecutor.get(), s -> s.forEach(Long.MAX_VALUE, result -> asyncResponse.resume(result))); }  @GET @Produces("application/json") void mainfest(@Suspended AsyncResponse asyncResponse, @Context ServletContext context); Map<String, String> getManifest(final InputStream input);  }
@Test public void testMainfest() { when(context.getResourceAsStream(any(String.class))).thenReturn( new ByteArrayInputStream(manifest .getBytes())); resource.mainfest(response,context); Map<String, String> manifest =response.response() ; assertThat(manifest.get("Implementation-Build"), is("281837")); }