Source:
public void testIncludeExcludeOrder ( ) { java.lang.String expected = "alonbl@redhat.com" ; filter.clearFilterEntries ( ) ; filter.addFilterEntries ( org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilter.parse ( ( ( ( ( ( ( ( ( ( ( ( ( ( "" + "include:message1(smtp:" ) + expected ) + ") " ) + "include:message2(smtp:" ) + expected ) + ") " ) + "exclude:message3(smtp:" ) + expected ) + ") " ) + "exclude:message1(smtp:" ) + expected ) + ") " ) + "include:*" ) ) ) ; filter.processEvent ( new org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilterTest.E ( "message1" ) ) ; filter.processEvent ( new org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilterTest.E ( "message2" ) ) ; filter.processEvent ( new org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilterTest.E ( "message3" ) ) ; org.ovirt.engine.core.notifier.filter.AuditLogEvent event = smtp.getEvents ( ) . get ( 0 ) ; java.lang.String name = smtp.getNames ( ) . get ( 0 ) ; org.junit.Assert.assertEquals ( "message1" , event.getName ( ) ) ; org.junit.Assert.assertEquals ( expected , name ) ; event = smtp.getEvents ( ) . get ( 1 ) ; name = smtp.getNames ( ) . get ( 1 ) ; org.junit.Assert.assertEquals ( "message2" , event.getName ( ) ) ; org.junit.Assert.assertEquals ( expected , name ) ; org.junit.Assert.assertEquals ( 2 , smtp.getEvents ( ) . size ( ) ) ; }

Target:
public void testFilter ( ) throws java.lang.Exception { filter.clearFilterEntries ( ) ; filter.addFilterEntries ( org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilter.parse ( ( "include:message1(smtp:alonbl@redhat.com) " + ( ( ( ( ( ( ( ( ( ( "include:message2(smtp:alonbl@redhat.com) " + "exclude:message3(smtp:alonbl@redhat.com) " ) + "exclude:message1(smtp:alonbl@redhat.com) " ) + "include:message2(smtp:alon.barlev@gmail.com) " ) + "include:message1(smtp:alonbl@gentoo.org) " ) + "exclude:message1(snmp:profile1) " ) + "exclude:message2(snmp:profile1) " ) + "include:*(snmp:profile2) " ) + "include:*(snmp:profile1) " ) + "exclude:*" ) + "" ) ) ) ) ; filter.processEvent ( new org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilterTest.E ( "message0" ) ) ; filter.processEvent ( new org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilterTest.E ( "message1" ) ) ; filter.processEvent ( new org.ovirt.engine.core.notifier.filter.FirstMatchSimpleFilterTest.E ( "message2" ) ) ; org.junit.Assert.assertTrue ( snmp.getEvents ( ) . contains ( "message0-->profile1" ) ) ; org.junit.Assert.assertTrue ( snmp.getEvents ( ) . contains ( "message0-->profile2" ) ) ; org.junit.Assert.assertTrue ( snmp.getEvents ( ) . contains ( "message1-->profile2" ) ) ; org.junit.Assert.assertTrue ( snmp.getEvents ( ) . contains ( "message2-->profile2" ) ) ; org.junit.Assert.assertEquals ( 4 , snmp.getEvents ( ) . size ( ) ) ; org.junit.Assert.assertTrue ( smtp.getEvents ( ) . contains ( "message1-->alonbl@gentoo.org" ) ) ; org.junit.Assert.assertTrue ( smtp.getEvents ( ) . contains ( "message1-->alonbl@redhat.com" ) ) ; org.junit.Assert.assertTrue ( smtp.getEvents ( ) . contains ( "message2-->alon.barlev@gmail.com" ) ) ; org.junit.Assert.assertTrue ( smtp.getEvents ( ) . contains ( "message2-->alonbl@redhat.com" ) ) ; org.junit.Assert.assertEquals ( 4 , smtp.getEvents ( ) . size ( ) ) ; }