final Vertigo vertigo = new Vertigo(this);
vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
@Override
public void handle(AsyncResult<Cluster> result) {
assertTrue(result.succeeded());
NetworkConfig network = vertigo.createNetwork();
network.addComponent("sender", TestSimpleSender.class.getName());
// The component hook is added directly to a component configuration. The
// receive handler will be called each time a message is received on *any* port.
network.addComponent("receiver", TestSimpleReceiver.class.getName()).addHook(new TestComponentReceiveHook());
network.createConnection("sender", "out", "receiver", "in");
Cluster cluster = result.result();
cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
@Override
public void handle(AsyncResult<ActiveNetwork> result) {