// Destroy the connection between the "sender" and "receiver". Once
// the connection is destroyed the sender will no longer be able to
// send messages to the receiver and messages sent on its "out" port
// will simply be discarded.
ActiveNetwork network = result.result();
network.destroyConnection("sender", "out", "receiver", "in", new Handler<AsyncResult<ActiveNetwork>>() {
@Override
public void handle(AsyncResult<ActiveNetwork> result) {
if (result.failed()) {
assertTrue(result.cause().getMessage(), result.succeeded());
} else {