BloomFilterHttpService { @Get("/{name}") public JsonNode getFilterInfo(@Param String name) throws FilterNotFoundException { final BloomFilter filter = bloomFilterManager.ensureGetValidFilter(name); return MAPPER.valueToTree(filter); } BloomFilterHttpService(BloomFilterManager<?, ? super ExpirableBloomFilterConfig> bloomFilterManager); @Put("/{name}") HttpResponse create(@Param String name,
                               @RequestObject JsonNode req); @Get("/{name}") JsonNode getFilterInfo(@Param String name); @Get("/list") JsonNode list(); @Post("/{name}/check") JsonNode check(@Param String name,
                          @RequestObject JsonNode req); @Post("/{name}/multi-check") JsonNode multiCheck(@Param String name,
                               @RequestObject JsonNode req); @Post("/{name}/check-and-set") JsonNode checkAndSet(@Param String name,
                                @RequestObject JsonNode req); @Post("/{name}/multi-check-and-set") JsonNode multiCheckAndSet(@Param String name,
                                     @RequestObject JsonNode req); @Delete("/{name}") HttpResponse remove(@Param String name);  }
@Test public void testGetFilterInfo() throws Exception { final GuavaBloomFilter expectedFilter = factory.createFilter(new ExpirableBloomFilterConfig()); when(mockedManager.ensureGetValidFilter(testingFilterName)).thenReturn(expectedFilter); final GuavaBloomFilter filter = mapper.convertValue(service.getFilterInfo(testingFilterName), GuavaBloomFilter.class); assertThat(filter).isEqualTo(expectedFilter); }