Endpoint endpoint = createEndpoint("endpoint");
initEndpoint(endpoint, entry.getKey());
synapseConfig.addEndpoint(endpoint.getName(), endpoint);
SequenceMediator seq1 = createSequence("seq1", null);
SendMediator send = new SendMediator();
IndirectEndpoint endpointRef = new IndirectEndpoint();
endpointRef.setKey(endpoint.getName());
send.setEndpoint(endpointRef);
seq1.addChild(send);
synapseConfig.addSequence(seq1.getName(), seq1);
SequenceMediator seq2 = createSequence("seq2", seq1.getName());
synapseConfig.addSequence(seq2.getName(), seq2);
SequenceMediator seq3 = new SequenceMediator();
seq3.setName("seq3");
synapseConfig.addSequence(seq3.getName(), seq3);
Entry wsdl = new Entry("wsdl");
synapseConfig.addEntry(wsdl.getKey(), wsdl);
ProxyService proxy = createProxy("proxy", seq2.getName(), seq3.getName(), wsdl.getKey());
synapseConfig.addProxyService(proxy.getName(), proxy);
assertDependency(ConfigurationObject.TYPE_SEQUENCE, seq2.getName(), proxy.getName());
assertDependency(ConfigurationObject.TYPE_SEQUENCE, seq3.getName(), proxy.getName());
assertDependency(ConfigurationObject.TYPE_ENTRY, wsdl.getKey(), proxy.getName());
synapseConfig.removeProxyService(proxy.getName());
assertNoDependency(ConfigurationObject.TYPE_SEQUENCE, seq2.getName());
assertNoDependency(ConfigurationObject.TYPE_SEQUENCE, seq3.getName());
assertNoDependency(ConfigurationObject.TYPE_ENTRY, wsdl.getKey());
assertDependency(ConfigurationObject.TYPE_SEQUENCE, seq1.getName(), seq2.getName());
synapseConfig.removeSequence(seq2.getName());
assertNoDependency(ConfigurationObject.TYPE_SEQUENCE, seq1.getName());