getResourceAsStream(seqFileName));
seq.setFileName(seqFileName);
Endpoint endpoint = createEndpoint(getClass().getClassLoader().
getResourceAsStream("epr1.xml"));
// Do not set a file name for the endpoint
ProxyService proxy = createProxy(getClass().getClassLoader().
getResourceAsStream(proxyFileName));
proxy.setFileName(proxyFileName);
SynapseConfiguration synapseConfig = synapseConfigSvc.getSynapseConfiguration();
synapseConfig.addSequence(seq.getName(), seq);
synapseConfig.addEndpoint(endpoint.getName(), endpoint);
synapseConfig.addProxyService(proxy.getName(), proxy);
MediationPersistenceManager pm = getMediationPersistenceManager();
pm.saveItem(seq.getName(), ServiceBusConstants.ITEM_TYPE_SEQUENCE);
pm.saveItem(endpoint.getName(), ServiceBusConstants.ITEM_TYPE_ENDPOINT);
pm.saveItem(proxy.getName(), ServiceBusConstants.ITEM_TYPE_PROXY_SERVICE);
hold();
try {
File seqFile = new File(path + File.separator +
MultiXMLConfigurationBuilder.SEQUENCES_DIR, seq.getFileName());
SequenceMediator seqCopy = createSequence(new FileInputStream(seqFile));
assertEquals(seq, seqCopy);
File proxyFile = new File(path + File.separator +
MultiXMLConfigurationBuilder.PROXY_SERVICES_DIR, proxy.getFileName());
ProxyService proxyCopy = createProxy(new FileInputStream(proxyFile));
assertEquals(proxy, proxyCopy);
Endpoint endpointCopy = getConfigurationFromSynapseXML().getDefinedEndpoints().
get(endpoint.getName());
assertEquals(endpoint, endpointCopy);