final AddressingContext addressingContext = AddressingContext.createRequestContext(activationCoordinatorService, messageId) ;
final AttributedUnsignedIntType expiresValue = (expires == null ? null : new AttributedUnsignedIntType(expires.longValue())) ;
ActivationCoordinatorClient.getClient().sendCreateCoordination(addressingContext, coordinationType, expiresValue, coordinationContext) ;
final CreateCoordinationContextDetails details = testActivationCoordinatorProcessor.getCreateCoordinationContextDetails(messageId, 10000) ;
final CreateCoordinationContextType requestCreateCoordinationContext = details.getCreateCoordinationContext() ;
final AddressingContext requestAddressingContext = details.getAddressingContext() ;
assertEquals(requestAddressingContext.getTo().getValue(), activationCoordinatorService.getAddress().getValue());
assertEquals(requestAddressingContext.getFrom().getAddress().getValue(), activationRequesterService.getAddress().getValue());
assertEquals(requestAddressingContext.getReplyTo().getAddress().getValue(), activationRequesterService.getAddress().getValue());
assertEquals(requestAddressingContext.getMessageID().getValue(), messageId);
if (expires == null)
{
assertNull(requestCreateCoordinationContext.getExpires()) ;
}
else
{
assertEquals(expires.longValue(), requestCreateCoordinationContext.getExpires().getValue());
}
if (coordinationContext == null)
{
assertNull(requestCreateCoordinationContext.getCurrentContext()) ;
}
else
{
assertNotNull(requestCreateCoordinationContext.getCurrentContext()) ;
assertEquals(requestCreateCoordinationContext.getCurrentContext().getIdentifier().getValue(),
coordinationContext.getIdentifier().getValue()) ;
if (coordinationContext.getExpires() == null)
{
assertNull(requestCreateCoordinationContext.getCurrentContext().getExpires()) ;
}
else
{
assertEquals(requestCreateCoordinationContext.getCurrentContext().getExpires().getValue(),
coordinationContext.getExpires().getValue()) ;
}
assertEquals(requestCreateCoordinationContext.getCurrentContext().getIdentifier().getValue(),
coordinationContext.getIdentifier().getValue()) ;
}
assertEquals(requestCreateCoordinationContext.getCoordinationType().getValue(), coordinationType);
}