@Test
public void testAllCommands() throws Exception {

	// Before
	File f = TestUtils.findTestFile( "/commands/create-and-delete.commands" );
	CommandsExecutor executor = new CommandsExecutor( this.manager, this.app, f );
	String targetId = this.manager.targetsMngr().createTarget( "id: tid\nhandler: h" );
	Assert.assertEquals( "tid", targetId );
	List<String> instancePaths = new ArrayList<> ();
	for( Instance inst : InstanceHelpers.getAllInstances( this.app ))
		instancePaths.add( InstanceHelpers.computeInstancePath( inst ));
	int instancesCount = InstanceHelpers.getAllInstances( this.app ).size();
	Assert.assertTrue( instancePaths.contains( "/tomcat-vm" ));
	// Execute
	executor.execute();
	// After
	instancePaths.clear();;
	for( Instance inst : InstanceHelpers.getAllInstances( this.app ))
		instancePaths.add( InstanceHelpers.computeInstancePath( inst ));
	Assert.assertEquals( instancesCount + 5, instancePaths.size());
	Assert.assertTrue( instancePaths.contains( "/tomcat 1" ));
	Assert.assertTrue( instancePaths.contains( "/tomcat 1/tomcat-server" ));
	Assert.assertTrue( instancePaths.contains( "/tomcat 1/tomcat-server/hello-world" ));
	Assert.assertTrue( instancePaths.contains( "/tomcat 2" ));
	Assert.assertTrue( instancePaths.contains( "/tomcat 2/tomcat-server" ));
	Assert.assertTrue( instancePaths.contains( "/tomcat 2/tomcat-server/hello-world" ));
	Assert.assertTrue( instancePaths.contains( "/tomcat 3" ));
	Assert.assertTrue( instancePaths.contains( "/tomcat 3/my-tomcat-server" ));
	Assert.assertFalse( instancePaths.contains( "/tomcat 3/tomcat-server/hello-world" ));
	Assert.assertFalse( instancePaths.contains( "/tomcat 3/my-tomcat-server/hello-world" ));
	Assert.assertFalse( instancePaths.contains( "/tomcat-vm" ));
	Instance instance = InstanceHelpers.findInstanceByPath( this.app, "/tomcat 1" );
	Assert.assertNotNull( instance );
	Assert.assertNull( this.manager.targetsMngr().findTargetId( this.app, "/tomcat 1" ));
	instance = InstanceHelpers.findInstanceByPath( this.app, "/tomcat 2" );
	Assert.assertNotNull( instance );
	Assert.assertNull( this.manager.targetsMngr().findTargetId( this.app, "/tomcat 2" ));
	instance = InstanceHelpers.findInstanceByPath( this.app, "/tomcat 3" );
	Assert.assertNotNull( instance );
	Assert.assertEquals( targetId, this.manager.targetsMngr().findTargetId( this.app, "/tomcat 3" ));
}