test_class.declarator: testingFilterName = "TestingFilter"
test_class.modifier: private static final
test_class.original_string: private static final String testingFilterName = "TestingFilter";
test_class.type: String
test_class.var_name: testingFilterName
test_class.declarator: mapper = new ObjectMapper()
test_class.modifier: private static final
test_class.original_string: private static final ObjectMapper mapper = new ObjectMapper();
test_class.type: ObjectMapper
test_class.var_name: mapper
test_class.declarator: factory = new GuavaBloomFilterFactory()
test_class.modifier: private static final
test_class.original_string: private static final GuavaBloomFilterFactory factory = new GuavaBloomFilterFactory();
test_class.type: GuavaBloomFilterFactory
test_class.var_name: factory
test_class.declarator: mockedManager
test_class.modifier: private
test_class.original_string: private BloomFilterManager<GuavaBloomFilter, ExpirableBloomFilterConfig> mockedManager;
test_class.type: BloomFilterManager<GuavaBloomFilter, ExpirableBloomFilterConfig>
test_class.var_name: mockedManager
test_class.declarator: service
test_class.modifier: private
test_class.original_string: private BloomFilterHttpService service;
test_class.type: BloomFilterHttpService
test_class.var_name: service
test_class.file: filter-service-core/src/test/java/cn/leancloud/filter/service/BloomFilterHttpServiceTest.java
test_class.identifier: BloomFilterHttpServiceTest
test_case.body: @Test
      public void testCheckAndSetValueIsNull() {
          final ObjectNode param = mapper.createObjectNode();
          assertThatThrownBy(() -> service.checkAndSet(testingFilterName, param))
                  .isInstanceOf(BadParameterException.class)
                  .hasMessageContaining("required parameter");
      }
test_case.class_method_signature: BloomFilterHttpServiceTest.testCheckAndSetValueIsNull()
test_case.full_signature: @Test public void testCheckAndSetValueIsNull()
test_case.identifier: testCheckAndSetValueIsNull
test_case.invocations: createObjectNode hasMessageContaining isInstanceOf assertThatThrownBy checkAndSet
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCheckAndSetValueIsNull()
focal_class.declarator: MAPPER = new ObjectMapper()
focal_class.modifier: private static final
focal_class.original_string: private static final ObjectMapper MAPPER = new ObjectMapper();
focal_class.type: ObjectMapper
focal_class.var_name: MAPPER
focal_class.declarator: bloomFilterManager
focal_class.modifier: private final
focal_class.original_string: private final BloomFilterManager<?, ? super ExpirableBloomFilterConfig> bloomFilterManager;
focal_class.type: BloomFilterManager<?, ? super ExpirableBloomFilterConfig>
focal_class.var_name: bloomFilterManager
focal_class.file: filter-service-core/src/main/java/cn/leancloud/filter/service/BloomFilterHttpService.java
focal_class.identifier: BloomFilterHttpService
focal_class.class_method_signature: BloomFilterHttpService.BloomFilterHttpService(BloomFilterManager<?, ? super ExpirableBloomFilterConfig> bloomFilterManager)
focal_class.full_signature: public  BloomFilterHttpService(BloomFilterManager<?, ? super ExpirableBloomFilterConfig> bloomFilterManager)
focal_class.identifier: BloomFilterHttpService
focal_class.modifiers: public
focal_class.parameters: (BloomFilterManager<?, ? super ExpirableBloomFilterConfig> bloomFilterManager)
focal_class.signature:  BloomFilterHttpService(BloomFilterManager<?, ? super ExpirableBloomFilterConfig> bloomFilterManager)
focal_class.class_method_signature: BloomFilterHttpService.create(@Param String name,
                                 @RequestObject JsonNode req)
focal_class.full_signature: @Put("/{name}") public HttpResponse create(@Param String name,
                                 @RequestObject JsonNode req)
focal_class.identifier: create
focal_class.modifiers: @Put("/{name}") public
focal_class.parameters: (@Param String name,
                                 @RequestObject JsonNode req)
focal_class.return: HttpResponse
focal_class.signature: HttpResponse create(@Param String name,
                                 @RequestObject JsonNode req)
focal_class.class_method_signature: BloomFilterHttpService.getFilterInfo(@Param String name)
focal_class.full_signature: @Get("/{name}") public JsonNode getFilterInfo(@Param String name)
focal_class.identifier: getFilterInfo
focal_class.modifiers: @Get("/{name}") public
focal_class.parameters: (@Param String name)
focal_class.return: JsonNode
focal_class.signature: JsonNode getFilterInfo(@Param String name)
focal_class.class_method_signature: BloomFilterHttpService.list()
focal_class.full_signature: @Get("/list") public JsonNode list()
focal_class.identifier: list
focal_class.modifiers: @Get("/list") public
focal_class.parameters: ()
focal_class.return: JsonNode
focal_class.signature: JsonNode list()
focal_class.class_method_signature: BloomFilterHttpService.check(@Param String name,
                            @RequestObject JsonNode req)
focal_class.full_signature: @Post("/{name}/check") public JsonNode check(@Param String name,
                            @RequestObject JsonNode req)
focal_class.identifier: check
focal_class.modifiers: @Post("/{name}/check") public
focal_class.parameters: (@Param String name,
                            @RequestObject JsonNode req)
focal_class.return: JsonNode
focal_class.signature: JsonNode check(@Param String name,
                            @RequestObject JsonNode req)
focal_class.class_method_signature: BloomFilterHttpService.multiCheck(@Param String name,
                                 @RequestObject JsonNode req)
focal_class.full_signature: @Post("/{name}/multi-check") public JsonNode multiCheck(@Param String name,
                                 @RequestObject JsonNode req)
focal_class.identifier: multiCheck
focal_class.modifiers: @Post("/{name}/multi-check") public
focal_class.parameters: (@Param String name,
                                 @RequestObject JsonNode req)
focal_class.return: JsonNode
focal_class.signature: JsonNode multiCheck(@Param String name,
                                 @RequestObject JsonNode req)
focal_class.class_method_signature: BloomFilterHttpService.checkAndSet(@Param String name,
                                  @RequestObject JsonNode req)
focal_class.full_signature: @Post("/{name}/check-and-set") public JsonNode checkAndSet(@Param String name,
                                  @RequestObject JsonNode req)
focal_class.identifier: checkAndSet
focal_class.modifiers: @Post("/{name}/check-and-set") public
focal_class.parameters: (@Param String name,
                                  @RequestObject JsonNode req)
focal_class.return: JsonNode
focal_class.signature: JsonNode checkAndSet(@Param String name,
                                  @RequestObject JsonNode req)
focal_class.class_method_signature: BloomFilterHttpService.multiCheckAndSet(@Param String name,
                                       @RequestObject JsonNode req)
focal_class.full_signature: @Post("/{name}/multi-check-and-set") public JsonNode multiCheckAndSet(@Param String name,
                                       @RequestObject JsonNode req)
focal_class.identifier: multiCheckAndSet
focal_class.modifiers: @Post("/{name}/multi-check-and-set") public
focal_class.parameters: (@Param String name,
                                       @RequestObject JsonNode req)
focal_class.return: JsonNode
focal_class.signature: JsonNode multiCheckAndSet(@Param String name,
                                       @RequestObject JsonNode req)
focal_class.class_method_signature: BloomFilterHttpService.remove(@Param String name)
focal_class.full_signature: @Delete("/{name}") public HttpResponse remove(@Param String name)
focal_class.identifier: remove
focal_class.modifiers: @Delete("/{name}") public
focal_class.parameters: (@Param String name)
focal_class.return: HttpResponse
focal_class.signature: HttpResponse remove(@Param String name)
focal_method.body: @Post("/{name}/check-and-set")
      public JsonNode checkAndSet(@Param String name,
                                  @RequestObject JsonNode req)
              throws FilterNotFoundException {
          final JsonNode testingValue = checkNotNull("value", req.get("value"));
          checkParameter("value", testingValue.isTextual(), "expect string type");
  
          final BloomFilter filter = bloomFilterManager.ensureGetValidFilter(name);
          final boolean contain = !filter.set(testingValue.textValue());
          return BooleanNode.valueOf(contain);
      }
focal_method.class_method_signature: BloomFilterHttpService.checkAndSet(@Param String name,
                                  @RequestObject JsonNode req)
focal_method.full_signature: @Post("/{name}/check-and-set") public JsonNode checkAndSet(@Param String name,
                                  @RequestObject JsonNode req)
focal_method.identifier: checkAndSet
focal_method.invocations: checkNotNull get checkParameter isTextual ensureGetValidFilter set textValue valueOf
focal_method.modifiers: @Post("/{name}/check-and-set") public
focal_method.parameters: (@Param String name,
                                  @RequestObject JsonNode req)
focal_method.return: JsonNode
focal_method.signature: JsonNode checkAndSet(@Param String name,
                                  @RequestObject JsonNode req)