@Test
public void freezeAllFilters() throws IOException {

    final List<FilterRecord<BloomFilter>> records = generateFilterRecords(10);
    when(filterManager.iterator()).thenReturn(records.iterator());
    manager.freezeAllFilters(filterManager);
    try (FilterRecordInputStream<GuavaBloomFilter> stream = new FilterRecordInputStream<>(
            manager.persistentFilePath(),
            new GuavaBloomFilterFactory())) {
        for (FilterRecord<BloomFilter> expectRecord : records) {
            assertThat(stream.nextFilterRecord()).isEqualTo(expectRecord);
        }
        assertThat(stream.nextFilterRecord()).isNull();
    }
}