EndpointBuilder epb = muleContext.getRegistry().lookupEndpointBuilder("testEndpoint1");
assertNotNull(epb);
InboundEndpoint iep = epb.buildInboundEndpoint();
List<MessageProcessor> mps =iep.getMessageProcessors();
int count = 0;
SecurityFilterMessageProcessor securityMp = null;
for (MessageProcessor mp : mps)
{
if (mp instanceof SecurityFilterMessageProcessor)
{
count++;
securityMp = (SecurityFilterMessageProcessor) mp;
}
}
assertEquals(1, count);
assertEquals(CustomSecurityFilter.class, securityMp.getFilter().getClass());
epb = muleContext.getRegistry().lookupEndpointBuilder("testEndpoint2");
assertNotNull(epb);
iep = epb.buildInboundEndpoint();
mps =iep.getMessageProcessors();
count = 0;
securityMp = null;
for (MessageProcessor mp : mps)
{
if (mp instanceof SecurityFilterMessageProcessor)
{
count++;
securityMp = (SecurityFilterMessageProcessor) mp;
}
}
assertEquals(1, count);
assertEquals(MuleEncryptionEndpointSecurityFilter.class, securityMp.getFilter().getClass());
}