//Obtain a server endpoint instance
ServerEndpoint endpoint = getServerEndpoint();
try {
//Verify that an arbitrary exception is propagated
endpoint.enumerateListenEndpoints(
new ExceptionListenContext(new ArbitraryException()));
} catch (ArbitraryException a) {
try {
//Verify that an IOException is propagated
endpoint.enumerateListenEndpoints(
new ExceptionListenContext(new IOException()));