}
@Test
public void withReferenceParameters() throws Exception {
NotificatorService service = createNotificatorService();
Subscribe subscribe = new Subscribe();
ExpirationType exp = new ExpirationType();
exp.setValue(
DurationAndDateUtil.convertToXMLString(DurationAndDateUtil.parseDurationOrTimestamp("PT0S")));
subscribe.setExpires(exp);
EndpointReferenceType eventSinkERT = new EndpointReferenceType();
JAXBElement<String> idqn
= new JAXBElement<String>(new QName("http://www.example.org", "MyReferenceParameter"),
String.class,
"380");
JAXBElement<String> idqn2
= new JAXBElement<String>(new QName("http://www.example.org", "MyReferenceParameter2"),
String.class,
"381");
eventSinkERT.setReferenceParameters(new ReferenceParametersType());
eventSinkERT.getReferenceParameters().getAny().add(idqn);
eventSinkERT.getReferenceParameters().getAny().add(idqn2);
AttributedURIType eventSinkAddr = new AttributedURIType();
String url = TestUtil.generateRandomURLWithHttpTransport(NOTIFICATION_TEST_PORT);
eventSinkAddr.setValue(url);
eventSinkERT.setAddress(eventSinkAddr);
subscribe.setDelivery(new DeliveryType());
subscribe.getDelivery().getContent().add(new ObjectFactory().createNotifyTo(eventSinkERT));
eventSourceClient.subscribeOp(subscribe);
Server eventSinkServer = createEventSinkWithReferenceParametersAssertion(url,
eventSinkERT.getReferenceParameters());