public void renewTest() {
Date date = new Date(System.currentTimeMillis() + 3600000 * 2);
Calendar cal = Calendar.getInstance();
cal.setTime(date);
String message =
"<wse:Renew xmlns:wse=\"http://schemas.xmlsoap.org/ws/2004/08/eventing\">\n" +
" <wse:Expires>" + ConverterUtil.convertToString(cal) + "</wse:Expires>\n" +
"</wse:Renew>";
try {
MessageContext msgCtx = createMessageContext(message, EventingConstants.WSE_RENEW);
QName qname = new QName(EventingConstants.WSE_EVENTING_NS,
EventingConstants.WSE_EN_IDENTIFIER, "wse");
TestUtils.addSOAPHeaderBlock(msgCtx, qname, id);
source.receive(msgCtx);
} catch (Exception ignored) {
}
try {
assertEquals(1, subMan.getSubscriptions().size());
SynapseSubscription s = (SynapseSubscription) subMan.getSubscription(this.id);
assertEquals(SUB_MAN_URL, s.getSubManUrl());
assertEquals(ADDR_URL, s.getAddressUrl());
assertEquals(FILTER_DIALECT, s.getFilterDialect());
assertEquals(FILTER, s.getFilterValue());
assertEquals(date, s.getExpires().getTime());
} catch (EventException e) {
fail("Eventing exception occured while accessing the subscription manager");
}
}