public void test() throws Exception {
String source = Files.forIO().readFrom(getClass().getResourceAsStream("transaction_filter.xml"), "utf-8");
TransactionReport report = DefaultSaxParser.parse(source);
TransactionReportFilter f1 = new TransactionReportFilter(null, null, "10.1.77.193");
String expected1 = Files.forIO().readFrom(getClass().getResourceAsStream("transaction_filter_type.xml"), "utf-8");
Assert.assertEquals(expected1.replaceAll("\r", ""), f1.buildXml(report).replaceAll("\r", ""));
TransactionReportFilter f2 = new TransactionReportFilter("URL", null, null);
String expected2 = Files.forIO().readFrom(getClass().getResourceAsStream("transaction_filter_name.xml"), "utf-8");
Assert.assertEquals(expected2.replaceAll("\r", ""), f2.buildXml(report).replaceAll("\r", ""));
}