}
}
@Test
public void subnetTest() {
final SubnetDefinition everyOther = new NetworkDefiner(){
{
inputPort("IN");
outputPort("OUT");
component("roundRobin", RoundRobinScheduler.class);
component("drop", Drop.class);
from("IN").to("roundRobin");
from("roundRobin","OUT[0]").to("OUT");
from("roundRobin","OUT[1]").to("drop");
}
};
runNetworkDefinition(new NetworkDefiner() {
{
component("generator", IntegerGenerator.class);
component("every other", everyOther);
component("out", ToCollection.class);