@Test
public void testForceCreateFilter() throws Exception {

    final int validPeriodAfterCreate = 1000;
    final int validPeriodAfterAccess = 100;
    final int expectedInsertions = 1000000;
    final double fpp = 0.0001;
    final ObjectNode request = mapper.createObjectNode();
    request.put("validPeriodAfterCreate", validPeriodAfterCreate);
    request.put("validPeriodAfterAccess", validPeriodAfterAccess);
    request.put("fpp", fpp);
    request.put("expectedInsertions", expectedInsertions);
    request.put("overwrite", true);
    final ExpirableBloomFilterConfig expectConfig = new ExpirableBloomFilterConfig(expectedInsertions, fpp);
    expectConfig.setValidPeriodAfterCreate(Duration.ofSeconds(validPeriodAfterCreate));
    expectConfig.setValidPeriodAfterAccess(Duration.ofSeconds(validPeriodAfterAccess));
    final GuavaBloomFilter expectedFilter = factory.createFilter(expectConfig);
    final CreateFilterResult<GuavaBloomFilter> result = new CreateFilterResult<>(expectedFilter, true);
    when(mockedManager.createFilter(testingFilterName, expectConfig, true)).thenReturn(result);
    final AggregatedHttpResponse response = service.create(testingFilterName, request).aggregate().get();
    assertThat(response.status().code()).isEqualTo(HttpStatus.CREATED.code());
    final JsonNode responseInJson = mapper.readTree(response.content(StandardCharsets.UTF_8));
    final GuavaBloomFilter filter = new ObjectMapper()
            .readerFor(GuavaBloomFilter.class)
            .readValue(responseInJson);
    assertThat(filter).isNotNull().isEqualTo(expectedFilter);
}