TestDeployment1 deployment1 = new TestDeployment1();
TestMetaData1 component1 = new TestMetaData1("TestBean1");
deployment1.addBean(component1);
attachments.addAttachment(TestDeployment1.class, deployment1);
TestDeployment2 deployment2 = new TestDeployment2();
TestMetaData2 component2 = new TestMetaData2("TestBean2");
deployment2.addBean(component2);
attachments.addAttachment(TestDeployment2.class, deployment2);
main.addDeployment(deployment);
main.process();