private TestModule createModule() throws IOException {
File moduleXml = new File(JPAEMFFromModuleBasedPartitionManagerTestCase.class
.getResource(JPAEMFFromModuleBasedPartitionManagerTestCase.class
.getSimpleName() + "-module.xml").getFile());
TestModule module = new TestModule("test.picketlink-emf-module-test", moduleXml);
module.addResource("picketlink-emf-module-test.jar")
.addClass(CustomCredential.class)
.addClass(CustomCredentialHandler.class)
.addClass(AbstractCredentialTypeEntity.class)
.addClass(AttributedTypeEntity.class)
.addClass(AttributeTypeEntity.class)
.addClass(GroupTypeEntity.class)
.addClass(IdentityTypeEntity.class)
.addClass(PartitionTypeEntity.class)
.addClass(PasswordCredentialTypeEntity.class)
.addClass(RelationshipIdentityTypeEntity.class)
.addClass(RelationshipIdentityTypeReferenceEntity.class)
.addClass(RelationshipTypeEntity.class)
.addClass(RoleTypeEntity.class)
.addClass(AccountEntity.class)
.addAsManifestResource(new File(JPAEMFFromModuleBasedPartitionManagerTestCase.class
.getResource(JPAEMFFromModuleBasedPartitionManagerTestCase.class.getSimpleName() + "-persistence.xml")
.getFile()), "persistence.xml");
module.create();
return module;
}