LoadbalanceEndpoint lb = new LoadbalanceEndpoint();
lb.setName("lb");
lb.setDefinition(new EndpointDefinition());
IndirectEndpoint child1 = new IndirectEndpoint();
child1.setKey(endpoint1.getName());
IndirectEndpoint child2 = new IndirectEndpoint();
child2.setKey(endpoint2.getName());
Endpoint child3 = createEndpoint("baz");
List<Endpoint> children = new ArrayList<Endpoint>();
children.add(child1);
children.add(child2);
children.add(child3);
lb.setChildren(children);
synapseConfig.addEndpoint(lb.getName(), lb);
assertDependency(ConfigurationObject.TYPE_ENDPOINT, child1.getKey(), lb.getName());
assertDependency(ConfigurationObject.TYPE_ENDPOINT, child2.getKey(), lb.getName());
assertNoDependency(ConfigurationObject.TYPE_ENDPOINT, child3.getName());
}