### Question:
ResourceModifier { public static String removeExecutorsFromAPILifeCycle(String apiLifeCycle) throws APIMigrationException { Writer stringWriter = new StringWriter(); Document doc = ResourceUtil.buildDocument(apiLifeCycle, "APILifeCycle"); if (doc != null) { Element rootElement = doc.getDocumentElement(); NodeList stateTags = rootElement.getElementsByTagName(Constants.API_LIFE_CYCLE_STATE_TAG); for (int i = 0; i < stateTags.getLength(); ++i) { Element stateTag = (Element) stateTags.item(i); NodeList dataModelTags = stateTag.getElementsByTagName(Constants.API_LIFE_CYCLE_DATA_MODEL_TAG); if (dataModelTags.getLength() > 0) { Element dataModelTag = (Element) dataModelTags.item(0); if (APIStatus.CREATED.toString().equalsIgnoreCase(stateTag.getAttribute("id"))) { NodeList dataTags = dataModelTag.getElementsByTagName(Constants.API_LIFE_CYCLE_DATA_TAG); for (int j=0; j < dataTags.getLength(); j++) { Element dataTag = (Element) dataTags.item(j); if (Constants.API_LIFE_CYCLE_EXECUTORS_TAG.equals(dataTag.getAttribute("name"))) { dataTag.getParentNode().removeChild(dataTag); } } } else { dataModelTag.getParentNode().removeChild(dataModelTag); } } } try { doc.getDocumentElement().normalize(); Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.ENCODING, Charset.defaultCharset().toString()); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http: transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.transform(new DOMSource(doc), new StreamResult(stringWriter)); } catch (TransformerException e) { ResourceUtil.handleException("Error occurred while transforming modified " + "APILifeCycle", e); } } return stringWriter.toString(); }  static String modifyWorkFlowExtensions(String xmlContent); static String modifyTiers(String xmlContent, String fileName); static String removeExecutorsFromAPILifeCycle(String apiLifeCycle); static void updateSynapseConfigs(List<SynapseDTO> synapseDTOs); static boolean decryptConsumerKeyIfEncrypted(ConsumerKeyDTO consumerKeyDTO);  }### Answer:
@Test public void testRemoveExecutorsFromAPILifeCycle() throws Exception { String apiLifeCycle = IOUtils.toString(lifeCycleStream); String modifiedLifeCycle = ResourceModifier.removeExecutorsFromAPILifeCycle(apiLifeCycle); Document modifiedDoc = ResourceUtil.buildDocument(modifiedLifeCycle, "modifiedLifeCycle"); Document expectedDoc = ResourceUtil.buildDocument(executorlessLifeCycleStream, FILE_NAME_EXECUTORLESS_API_LIFE_CYCLE); Assert.assertEquals(compareXMLDocuments(expectedDoc, modifiedDoc), true); }