expect(endpoint.getEndpointConfiguration()).andReturn(endpointConfiguration).anyTimes();
producer.send(anyObject(Message.class), anyObject(TestContext.class));
expectLastCall().andAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
DomXmlMessageValidator validator = new DomXmlMessageValidator();
XmlMessageValidationContext validationContext = new XmlMessageValidationContext();
validationContext.setControlMessage(controlMessage);
validationContext.setSchemaValidation(false);
validator.validateMessage(((Message)EasyMock.getCurrentArguments()[0]), context, validationContext);
return null;
}
}).once();
expect(endpoint.getActor()).andReturn(null).anyTimes();