### Question:
APIDeployer extends AbstractSynapseArtifactDeployer { @Override public String deploySynapseArtifact(OMElement artifactConfig, String fileName, Properties properties) { CustomLogSetter.getInstance().setLogAppender(customLogContent); if (log.isDebugEnabled()) { log.debug("API deployment from file : " + fileName + " : Started"); } try { API api = APIFactory.createAPI(artifactConfig, properties); api.setArtifactContainerName(customLogContent); if (api != null) { api.setFileName((new File(fileName)).getName()); if (log.isDebugEnabled()) { log.debug("API named '" + api.getName() + "' has been built from the file " + fileName); } api.init(getSynapseEnvironment()); if (log.isDebugEnabled()) { log.debug("Initialized the API: " + api.getName()); } getSynapseConfiguration().addAPI(api.getName(), api); if (log.isDebugEnabled()) { log.debug("API deployment from file : " + fileName + " : Completed"); } String startTime = String.valueOf(System.currentTimeMillis()); executeExtendedSynapseHandlerOnArtifactDeployment(api.getName(), SynapseConstants.FAIL_SAFE_MODE_API, startTime); log.info("API named '" + api.getName() + "' has been deployed from file : " + fileName); return api.getName(); } else { handleSynapseArtifactDeploymentError("API deployment Failed. The artifact " + "described in the file " + fileName + " is not a valid API"); } } catch (Exception e) { handleSynapseArtifactDeploymentError("API deployment from the file : " + fileName + " : Failed.", e); } return null; }  @Override String deploySynapseArtifact(OMElement artifactConfig, String fileName, Properties properties); @Override String updateSynapseArtifact(OMElement artifactConfig, String fileName, String existingArtifactName, Properties properties); @Override void undeploySynapseArtifact(String artifactName); @Override void restoreSynapseArtifact(String artifactName);  }### Answer:
@Test public void testDeploy() throws Exception { String inputXML = "<api name=\"TestAPI\" context=\"/order\" xmlns=\"http: + "<resource url-mapping=\"/list\" inSequence=\"seq1\" outSequence=\"seq2\" xmlns=\"http: + "</api>"; OMElement inputElement = AXIOMUtil.stringToOM(inputXML); APIDeployer apiDeployer = new APIDeployer(); SynapseConfiguration synapseConfiguration = new SynapseConfiguration(); AxisConfiguration axisConfiguration = synapseConfiguration.getAxisConfiguration(); ConfigurationContext cfgCtx = new ConfigurationContext(axisConfiguration); SynapseEnvironment synapseEnvironment = new Axis2SynapseEnvironment(cfgCtx, synapseConfiguration); axisConfiguration.addParameter(new Parameter(SynapseConstants.SYNAPSE_ENV, synapseEnvironment)); axisConfiguration.addParameter(new Parameter(SynapseConstants.SYNAPSE_CONFIG, synapseConfiguration)); cfgCtx.setAxisConfiguration(axisConfiguration); apiDeployer.init(cfgCtx); String response = apiDeployer.deploySynapseArtifact(inputElement, "sampleFile", null); Assert.assertEquals("API not deployed!", "TestAPI", response); }