@SuppressWarnings("rawtypes")
RetryingTxnBatchRunner<?,?> batchRunner = new RetryingTxnBatchRunner();
batchRunner.setDataSource(datasource);
batcher.setBatchRunner(batchRunner);
batcher.startup();
BatchingAuditTrail auditTrail = new BatchingAuditTrail();
auditTrail.setBatcher(batcher);
auditTrail.setDataSource(datasource);
// auditTrail.setMessagePostProcessor(new CompressedBase64PostProcessor());
try {
auditTrail.startup();
} catch (Exception e) {
throw new RuntimeException(e);
}
Date occurrence = new Date();
auditTrail.synchLog(1, occurrence, "1", "2", "", "", "", "detail", "Text");
try {
List<AuditTrailInfo> selectAuditTrails = monitoringDbDialect.selectAuditTrails(null, null, null, null, 3, datasource.getConnection());
assertEquals(1, selectAuditTrails.size());
assertEquals(occurrence.getTime(),selectAuditTrails.get(0).getOccurrence().getTime());