MemoryLogDataStore2 extends MemoryLogDataStore implements LogDataStore2 { @Override public FilterResult filter(LogDataFilter logDataFilter) { return doFiltering(logDataFilter); }  @Override FilterResult filter(LogDataFilter logDataFilter); @Override SearchResult search(SearchCriteria searchCriteria); @Override int getCountWithoutFilters(); @Override int getCount();  }
@Test public void testFilter() throws Exception { MemoryLogDataStore2 logDataStore2 = new MemoryLogDataStore2(); String[] messages = "Ala ma kota a kot ma ale".split(" "); LogData[] logDatas = new LogData[10000*messages.length]; for (int i=0; i<logDatas.length;i++){ LogData logData = new LogDataBuilder().withDate(new Date(100000l + i * 100)).withMessage(messages[i % messages.length]).build(); logDatas[i]=logData; } logDataStore2.add(logDatas); logDataStore2.filter(new LogDataFilter("kot")); int filteredCount = logDataStore2.getCount(); assertEquals(20000,filteredCount); }