JsonObject json = new JsonObject().putString(NetworkConfig.NETWORK_NAME, "test");
JsonObject jsonConnection = new JsonObject()
.putObject("source", new JsonObject().putString("component", "foo").putString("port", "notout"))
.putObject("target", new JsonObject().putString("component", "bar").putString("port", "notin"))
.putObject("grouping", new JsonObject().putString("type", "random"));
json.putArray("connections", new JsonArray().add(jsonConnection));
NetworkConfig network = new Vertigo(null, null).createNetwork(json);
assertEquals("test", network.getName());
ConnectionConfig connection = network.getConnections().iterator().next();
assertEquals("foo", connection.getSource().getComponent());
assertEquals("notout", connection.getSource().getPort());