assertEquals("endpoint.pop3.ross.mycompany.com", ep.getName());
}
public void testEndpointNames() throws Exception
{
ImmutableEndpoint ep = muleContext.getEndpointFactory().getInboundEndpoint(
"test://cn=foo,name=queue?endpointName=foo");
muleContext.getRegistry().registerEndpoint(ep);
assertEquals("endpoint.test.cn.foo.name.queue", ep.getName());
ep = muleContext.getEndpointFactory().getInboundEndpoint(
"test://cn=foo,name=queue?endpointName=this_is@aWierd-Name:x");
assertEquals("this.is.aWierd.Name.x", ep.getName());
muleContext.getRegistry().registerEndpoint(ep);
// Test generating a unique name when there is a matching endpoint
ep = muleContext.getEndpointFactory().getInboundEndpoint(
"test://cn=foo,name=queue?endpointName=this_is@aWierd-Name:x");
assertEquals("this.is.aWierd.Name.x", ep.getName());
ep = muleContext.getEndpointFactory().getInboundEndpoint(
"test://cn=foo,name=queue?endpointName=this____is+another=@Wierd----Name:x:::");
assertEquals("this.is.another.Wierd.Name.x", ep.getName());
}