### Question:
ConsumerFilterManager extends ConfigManager { public ConsumerFilterData get(final String topic, final String consumerGroup) { if (!this.filterDataByTopic.containsKey(topic)) { return null; } if (this.filterDataByTopic.get(topic).getGroupFilterData().isEmpty()) { return null; } return this.filterDataByTopic.get(topic).getGroupFilterData().get(consumerGroup); } ConsumerFilterManager();  ConsumerFilterManager(BrokerController brokerController); static ConsumerFilterData build(final String topic, final String consumerGroup,
                                           final String expression, final String type,
                                           final long clientVersion); void register(final String consumerGroup, final Collection<SubscriptionData> subList); boolean register(final String topic, final String consumerGroup, final String expression,
                            final String type, final long clientVersion); void unRegister(final String consumerGroup); ConsumerFilterData get(final String topic, final String consumerGroup); Collection<ConsumerFilterData> getByGroup(final String consumerGroup); final Collection<ConsumerFilterData> get(final String topic); BloomFilter getBloomFilter(); @Override String encode(); @Override String configFilePath(); @Override void decode(final String jsonString); @Override String encode(final boolean prettyFormat); void clean(); ConcurrentMap<String, FilterDataMapByTopic> getFilterDataByTopic(); void setFilterDataByTopic(final ConcurrentHashMap<String, FilterDataMapByTopic> filterDataByTopic);  }### Answer:
@Test public void testPersist() { ConsumerFilterManager filterManager = gen(10, 10); try { filterManager.persist(); ConsumerFilterData filterData = filterManager.get("topic9", "CID_9"); assertThat(filterData).isNotNull(); assertThat(filterData.isDead()).isFalse(); ConsumerFilterManager loadFilter = new ConsumerFilterManager(); assertThat(loadFilter.load()).isTrue(); filterData = loadFilter.get("topic9", "CID_9"); assertThat(filterData).isNotNull(); assertThat(filterData.isDead()).isTrue(); assertThat(filterData.getCompiledExpression()).isNotNull(); } finally { deleteDirectory("./unit_test"); } }
@Test public void testPersist_clean() { ConsumerFilterManager filterManager = gen(10, 10); String topic = "topic9"; for (int i = 0; i < 10; i++) { String cid = "CID_" + i; ConsumerFilterData filterData = filterManager.get(topic, cid); assertThat(filterData).isNotNull(); assertThat(filterData.isDead()).isFalse(); filterData.setBornTime(System.currentTimeMillis() - 26 * 60 * 60 * 1000); filterData.setDeadTime(System.currentTimeMillis() - 25 * 60 * 60 * 1000); } try { filterManager.persist(); ConsumerFilterManager loadFilter = new ConsumerFilterManager(); assertThat(loadFilter.load()).isTrue(); ConsumerFilterData filterData = loadFilter.get(topic, "CID_9"); assertThat(filterData).isNull(); Collection<ConsumerFilterData> topicData = loadFilter.get(topic); assertThat(topicData).isNullOrEmpty(); } finally { deleteDirectory("./unit_test"); } }