### Question:
PriorityExecutorDeployer extends AbstractSynapseArtifactDeployer { @Override public String deploySynapseArtifact(OMElement artifactConfig, String fileName, Properties properties) { if (log.isDebugEnabled()) { log.debug("PriorityExecutor Deployment from file : " + fileName + " : Started"); } try { PriorityExecutor e = PriorityExecutorFactory.createExecutor( SynapseConstants.SYNAPSE_NAMESPACE, artifactConfig, true, properties); if (e != null) { e.setFileName((new File(fileName)).getName()); if (log.isDebugEnabled()) { log.debug("PriorityExecutor with name '" + e.getName() + "' has been built from the file " + fileName); } getSynapseConfiguration().addPriorityExecutor(e.getName(), e); e.init(); if (log.isDebugEnabled()) { log.debug("PriorityExecutor Deployment from file : " + fileName + " : Completed"); } log.info("PriorityExecutor named '" + e.getName() + "' has been deployed from file : " + fileName); return e.getName(); } else { handleSynapseArtifactDeploymentError("PriorityExecutor Deployment Failed. " + "The artifact described in the file " + fileName + " is not a PriorityExecutor"); } } catch (Exception e) { handleSynapseArtifactDeploymentError( "PriorityExecutor 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 = "<priority-executor name=\"TestExec\" xmlns=\"http: + " <queues>" + " <queue size=\"100\" priority=\"1\"/>" + " <queue size=\"100\" priority=\"10\"/>" + " </queues>" + " </priority-executor>"; OMElement inputElement = AXIOMUtil.stringToOM(inputXML); PriorityExecutorDeployer priorityExecutorDeployer = new PriorityExecutorDeployer(); 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); priorityExecutorDeployer.init(cfgCtx); String response = priorityExecutorDeployer.deploySynapseArtifact(inputElement, "sampleFile", null); Assert.assertEquals("Priority executor not deployed!", "TestExec", response); }