} catch (Exception e) {
throw new RuntimeException(e);
}
PojoDependencyInjector dependyInjector = new PojoDependencyInjector();
MonitoringDataStorage monitoringDataStorage;
try {
monitoringDataStorage = new MonitoringDataStorage(File.createTempFile("test", ".tmp").getParentFile(), "copperMonitorLog");
} catch (IOException e1) {
throw new RuntimeException(e1);
}
final MonitoringDataAccessQueue monitoringQueue = new MonitoringDataAccessQueue(new MonitoringDataAccesor(monitoringDataStorage),new MonitoringDataAdder(monitoringDataStorage));
final MonitoringDataCollector monitoringDataCollector = new MonitoringDataCollector(monitoringQueue);
MonitoringDependencyInjector monitoringDependencyInjector= new MonitoringDependencyInjector(dependyInjector, monitoringDataCollector);
BillAdapterImpl billAdapterImpl = new BillAdapterImpl(monitoringDataCollector);
billAdapterImpl.initWithEngine(new MonitoringAdapterProcessingEngine(billAdapterImpl,persistentengine,monitoringDataCollector));
dependyInjector.register("billAdapter", billAdapterImpl);
dependyInjector.register("auditTrail", auditTrail);
persistentengine.setDependencyInjector(monitoringDependencyInjector);
persistentengine.startup();
try {