@Test
public void testCheckAndSet() throws Exception {

    final String testingValue = "testing-value";
    final GuavaBloomFilter testingFilter = factory.createFilter(new ExpirableBloomFilterConfig());
    when(mockedManager.ensureGetValidFilter(testingFilterName)).thenReturn(testingFilter);
    final ObjectNode param = mapper.createObjectNode();
    param.put("value", testingValue);
    final JsonNode res = service.checkAndSet(testingFilterName, param);
    assertThat(res.isBoolean()).isTrue();
    assertThat(res.asBoolean()).isFalse();
    assertThat(testingFilter.mightContain(testingValue)).isTrue();
}