}
private void setupOffer(boolean includeOffer, boolean acceptOffer)
throws DatatypeConfigurationException {
OfferType o = null;
if (includeOffer) {
o = control.createMock(OfferType.class);
}
cs.getOffer();
expectLastCall().andReturn(o);
if (includeOffer) {
dp.isAcceptOffers();
expectLastCall().andReturn(acceptOffer);
}
EndpointReferenceType acksTo =
control.createMock(EndpointReferenceType.class);
if (includeOffer && acceptOffer) {
maps.getTo();
expectLastCall().andReturn(to);
RMHandler handler = control.createMock(RMHandler.class);
dest.getHandler();
expectLastCall().andReturn(handler);
RMSource source = control.createMock(RMSource.class);
handler.getSource();
expectLastCall().andReturn(source);
o.getIdentifier();
expectLastCall().andReturn(control.createMock(Identifier.class));
o.getExpires();
expectLastCall().andReturn(null);
cs.getAcksTo();
expectLastCall().andReturn(acksTo);
AttributedURI address = control.createMock(AttributedURI.class);
acksTo.getAddress();