ProcessorManager { protected void init(CollectorConfiguration config) { for (String btxn : config.getTransactions().keySet()) { TransactionConfig btc = config.getTransactions().get(btxn); init(btxn, btc); } } ProcessorManager(CollectorConfiguration config); void init(String txn, TransactionConfig btc); void remove(String txn); boolean isProcessed(Trace trace, Node node, Direction direction); boolean isContentProcessed(Trace trace, Node node, Direction direction); void process(Trace trace, Node node, Direction direction,
            Map<String, ?> headers, Object... values);  }
@Test public void testInit() { CollectorConfiguration cc = new CollectorConfiguration(); TransactionConfig btc = new TransactionConfig(); cc.getTransactions().put("testapp", btc); Processor p1 = new Processor(); btc.getProcessors().add(p1); ProcessorManager pm = new ProcessorManager(cc); assertTrue(pm.getProcessors().containsKey("testapp")); assertEquals(1, pm.getProcessors().get("testapp").size()); assertEquals(p1, pm.getProcessors().get("testapp").get(0).getProcessor()); TransactionConfig btc2 = new TransactionConfig(); Processor p2 = new Processor(); btc2.getProcessors().add(p2); pm.init("testapp", btc2); assertTrue(pm.getProcessors().containsKey("testapp")); assertEquals(1, pm.getProcessors().get("testapp").size()); assertEquals(p2, pm.getProcessors().get("testapp").get(0).getProcessor()); }