String directory = "d03b";
String pluginID = "org.milyn.edi.unedifact." + directory;
String pathPrefix = pluginID.replace('.', '/');
InputStream inputStream = getClass().getResourceAsStream("/" + directory + ".zip");
ZipInputStream zipInputStream = new ZipInputStream(inputStream);
UnEdifactSpecificationReader ediSpecificationReader = new UnEdifactSpecificationReader(
zipInputStream, false, false);
ECoreGenerator ecoreGen = new ECoreGenerator();
Set<EPackage> packages = ecoreGen
.generatePackages(ediSpecificationReader.getEdiDirectory());
// To make tests execution faster let us just select a small subset of packages
Set<EPackage> smallerSet = new HashSet<EPackage>();
for (EPackage pkg : packages) {
if ("cuscar".equals(pkg.getName()) || "invoic".equals(pkg.getName())) {
smallerSet.add(pkg);