### Question:
ManagementApiParser { public static OMElement getManagementApiElement() throws IOException, CarbonException, XMLStreamException, ManagementApiUndefinedException { if (Objects.nonNull(managementApiElement)) { return managementApiElement; } if (LOG.isDebugEnabled()) { LOG.debug("Parsing the ManagementApi element from " + getConfigurationFilePath()); } @SuppressWarnings("unchecked") Iterator<OMElement> internalApis = getInternalApisElement().getFirstChildWithName(APIS_Q).getChildrenWithName(API_Q); while (internalApis.hasNext()) { OMElement apiOM = internalApis.next(); String apiName = apiOM.getAttributeValue(NAME_ATTR); if (MGT_API_NAME.equals(apiName)) { managementApiElement = apiOM; return apiOM; } } throw new ManagementApiUndefinedException("Management API not defined in " + getConfigurationFilePath()); }  static File getConfigurationFile(); static String getConfigurationFilePath(); static OMElement getManagementApiElement(); Map<String, char[]> getUserMap();  }### Answer:
@Test public void getManagementApiElement() throws CarbonException, XMLStreamException, ManagementApiUndefinedException, IOException { initializeConfDirectory(); OMElement managementApiElement = ManagementApiParser.getManagementApiElement(); Assert.assertNotNull(managementApiElement); Assert.assertEquals(MGT_API_NAME, managementApiElement.getAttributeValue(NAME_ATTR)); }