@Test
public void testMultipleSPCalls() throws Exception
{
TriggerSpecification triggerSpecification = null;
String spec = "AFTER Delete "
+
"CALL \"BackupUtilities.backupDeletedEntry\" ($ldapContext \"ou=Backup,ou=System\", $name, $deletedEntry); "
+
"CALL \"BackupUtilities.recreateDeletedEntry\" ($name, $deletedEntry);";
triggerSpecification = parser.parse( spec );
assertNotNull( triggerSpecification );
assertEquals( triggerSpecification.getActionTime(), ActionTime.AFTER );
assertEquals( triggerSpecification.getLdapOperation(), LdapOperation.DELETE );
List<SPSpec> spSpecs = triggerSpecification.getSPSpecs();
assertTrue( spSpecs != null );
assertTrue( spSpecs.size() == 2 );
SPSpec firstSpec = spSpecs.get( 0 );
assertEquals( firstSpec.getName(), "BackupUtilities.backupDeletedEntry" );
assertEquals( firstSpec.getOptions().size(), 0 );