File descriptionFile =
new File(getClass().getClassLoader().getResource("testDescription2.transformation").getFile());
List<TransformationDescription> descriptions = TransformationUtils.getDescriptionsFromXMLFile(descriptionFile);
installTransformations(descriptions);
ModelB modelB = new ModelB();
modelB.setIdB("TEST");
modelB.setTestB("test2");
modelB.setBlubB("testHellotest");
List<String> elements = new ArrayList<String>();
elements.add("A");
elements.add("B");
elements.add("C");
modelB.setElements(elements);
ModelA modelA = new ModelA();
modelA.setIdA(" Test ");
modelA.setTestA("Hello");
modelA.setBlubA("testHellotest");
ModelB resultB = transformModelAToModelB(modelA);
ModelA resultA = transformModelBToModelA(modelB);
assertThat(resultA.getIdA(), is(modelB.getIdB().toLowerCase()));
assertThat(resultA.getTestA(), is(modelB.getTestB().toUpperCase()));
assertThat(resultA.getBlubA(), is(modelB.getElements().size() + ""));
assertThat(resultA.getBlaA(), is("Hello World"));
assertThat(resultB.getIdB(), is("Test"));
assertThat(resultB.getTestB(), is(modelA.getTestA().length() + ""));
assertThat(resultB.getBlubB(), is("blubHelloblub"));
}