final AddressingContext addressingContext = AddressingContext.createRequestContext(activationRequesterService, messageId) ;
addressingContext.addRelatesTo(new RelationshipType(relatesTo)) ;
final String coordinationType = TestUtil.COORDINATION_TYPE ;
final String identifier = TestUtil.PROTOCOL_IDENTIFIER ;
final CoordinationContextType coordinationContext = new CoordinationContextType() ;
coordinationContext.setCoordinationType(new URI(coordinationType)) ;
coordinationContext.setIdentifier(new AttributedURIType(identifier)) ;
final EndpointReferenceType registrationService = new EndpointReferenceType(new AttributedURIType("http://www.example.com/registrationService")) ;
coordinationContext.setRegistrationService(registrationService) ;
final TestActivationRequesterCallback callback = new TestActivationRequesterCallback() {
public void createCoordinationContextResponse(final CreateCoordinationContextResponseType createCoordinationContextResponse, final AddressingContext addressingContext)
{
assertEquals(addressingContext.getTo().getValue(), activationRequesterService.getAddress().getValue());
assertEquals(addressingContext.getFrom().getAddress().getValue(), activationCoordinatorService.getAddress().getValue());
assertNull(addressingContext.getReplyTo());
assertEquals(addressingContext.getMessageID().getValue(), messageId);
final CoordinationContextType coordinationContext = createCoordinationContextResponse.getCoordinationContext() ;
assertNotNull(coordinationContext) ;
assertEquals(coordinationType, coordinationContext.getCoordinationType().getValue()) ;
assertEquals(identifier, coordinationContext.getIdentifier().getValue()) ;
assertEquals(registrationService.getAddress().getValue(), coordinationContext.getRegistrationService().getAddress().getValue()) ;
}
};
final ActivationRequesterProcessor requester = ActivationRequesterProcessor.getRequester() ;
requester.registerCallback(relatesTo, callback) ;
try