+ " does not result in a NulPointerException");
}
//Verify ListenEndpoint.listen(null);
endpoint = getServerEndpoint();
SETContext context = new SETContext();
endpoint.enumerateListenEndpoints(context);
ArrayList endpoints = context.getEndpoints();
log.finest(endpoints.size() + " endpoints returned");
Iterator i = endpoints.iterator();
while (i.hasNext()) {
EndpointHolder holder = (EndpointHolder) i.next();
ServerEndpoint.ListenEndpoint le = holder.getListenEndpoint();
exceptionThrown = false;
try {
log.finest("Testing ListenEndpoint.listen(null)");
le.listen(null);
} catch (NullPointerException e) {
holder.getListenHandle().close();
log.finest("ListenEndpoint.listen(null) throws exception");
exceptionThrown = true;
}
if (!exceptionThrown) {
throw new TestException("Passing in null to"
+ " ListenEndpoint.listen does not result in a"
+ " NullPointerException");
}
}
// wait to make sure resources are released before attempting
// to reuse endpoint
Thread.currentThread().sleep(1000 * 30);
//Verify Endpoint.newRequest(null);
endpoint = getServerEndpoint();
context = new SETContext();
Endpoint ep = endpoint.enumerateListenEndpoints(context);
exceptionThrown = false;
try {
ep.newRequest(null);
} catch (NullPointerException e) {
exceptionThrown = true;
}
if (!exceptionThrown) {
throw new TestException("Passing in null to"
+ " Endpoint.newRequest does not result in a"
+ " NullPointerException");
}
//Close listen operations
endpoints = context.getEndpoints();
i = endpoints.iterator();
while (i.hasNext()) {
((EndpointHolder)i.next()).getListenHandle().close();
}
// wait to make sure resources are released before attempting
// to reuse endpoint
Thread.currentThread().sleep(1000 * 30);
//Verify OutboundRequest.populateContext(null)
endpoint = getServerEndpoint();
context = new SETContext();
ep = endpoint.enumerateListenEndpoints(context);
OutboundRequestIterator it =
ep.newRequest(InvocationConstraints.EMPTY);
while (it.hasNext()) {
exceptionThrown = false;