PomRemoveModule extends AbstractPomOperation<PomRemoveModule> implements ChangeOrRemoveElement<PomRemoveModule> { public String getModuleName() { return moduleName; } PomRemoveModule();  PomRemoveModule(String moduleName); PomRemoveModule setModuleName(String moduleName); @Override PomRemoveModule failIfNotPresent(); @Override PomRemoveModule warnIfNotPresent(); @Override PomRemoveModule noOpIfNotPresent(); String getModuleName(); @Override String getDescription();  }
@Test public void moduleRemovedTest() throws IOException, XmlPullParserException { Model pomModelBeforeChange = getOriginalPomModel("pom.xml"); assertEquals(pomModelBeforeChange.getModules().size(), 1); assertTrue(pomModelBeforeChange.getModules().contains("module1")); PomRemoveModule pomRemoveModule = new PomRemoveModule("module1").relative("pom.xml"); assertEquals(pomRemoveModule.getModuleName(), "module1"); TOExecutionResult executionResult = pomRemoveModule.execution(transformedAppFolder, transformationContext); assertEquals(executionResult.getType(), TOExecutionResult.Type.SUCCESS); Model pomModelAfterChange = getTransformedPomModel("pom.xml"); assertEquals(pomModelAfterChange.getModules().size(), 0); }