}
@Test
public void logBufferValidatorTest() {
FilterModel filterModel = createFilterMock();
LogFilterEngine logFilterEngine = new LogFilterEngine();
logFilterEngine.setFilter(filterModel);
int logBufferSize = 1;
LogList logList = new LogList(logFilterEngine, logBufferSize);
for (LogEvent log : logMocks) {
logList.addLog(log);
}
Assert.assertEquals(0, logList.getFilteredLogsNum());
logFilterEngine.setFilter(null);
logList.revalidate();
Assert.assertEquals(1, logList.getFilteredLogsNum());
Assert.assertEquals(logMocks.get(5), logList.getFilteredLog(0));
logList.clear();