assertEquals(MultiFilterOR.class, MultiFilter.createMultiFilterOR(filterMock).getClass());
}
@Test
public void testAND(){
LogPrintoutFilter filterMock1 = EasyMock.createMock(LogPrintoutFilter.class);
LogPrintoutFilter filterMock2 = EasyMock.createMock(LogPrintoutFilter.class);
LogPrintoutFilter filterMock3 = EasyMock.createMock(LogPrintoutFilter.class);
LogPrintoutFilter filter = MultiFilter.createMultiFilterAND(filterMock1, filterMock2, filterMock3);
Log logMock = EasyMock.createMock(Log.class);
EasyMock.expect(filterMock1.isPrintAllowed(EasyMock.anyObject(Log.class))).andReturn(true).times(0,1);
EasyMock.expect(filterMock2.isPrintAllowed(EasyMock.anyObject(Log.class))).andReturn(false).times(1);
EasyMock.expect(filterMock3.isPrintAllowed(EasyMock.anyObject(Log.class))).andReturn(true).times(0,1);
EasyMock.replay(filterMock1, filterMock2, filterMock3, logMock);
assertFalse(filter.isPrintAllowed(logMock));
EasyMock.verify(filterMock1, filterMock2, filterMock3, logMock);
}