assertEquals(ImmutableList.of(), context.renderNode(oscReceiveNode5));
}
@Test
public void testCallReceiveAndSortData() {
Node oscReceiveNode1 = oscReceiveNode
.withName("osc_receive1")
.withInputValue("prefix", "/*/*/<itemid>");
Node sortNode = Node.ROOT
.withOutputRange(Port.Range.LIST)
.withFunction("list/sort")
.withInputAdded(Port.customPort("list", "list").withRange(Port.Range.LIST))
.withInputAdded(Port.stringPort("key", ""));
Node sortNode1 = sortNode
.withName("sort1")
.withInputValue("key", "itemid");
Node net1 = Node.NETWORK
.withChildAdded(oscReceiveNode1)
.withChildAdded(sortNode1)
.withRenderedChildName("sort1")
.connect("osc_receive1", "sort1", "list");
List<Map<String, Object>> expectedResult1 = ImmutableList.<Map<String, Object>>of(
ImmutableMap.<String, Object>of("address", "/2/multifader/11", "itemid", "11", "Column1", 0.5, "Column2", 0, "Column3", 0),
ImmutableMap.<String, Object>of("address", "/2/multitoggle/2/15", "itemid", "2", "Column1", 0.1, "Column2", 0.2, "Column3", 0),
ImmutableMap.<String, Object>of("address", "/2/multitoggle/4/10", "itemid", "4", "Column1", 0.3, "Column2", 0.6, "Column3", 0),
ImmutableMap.<String, Object>of("address", "/2/multifader/8", "itemid", "8", "Column1", 0.9, "Column2", 0, "Column3", 0),
ImmutableMap.<String, Object>of("address", "/r/g/b/20", "itemid", "b", "Column1", 0.15, "Column2", 0.35, "Column3", 0.77));
assertEquals(expectedResult1, context.renderNode(net1));
Node oscReceiveNode2 = oscReceiveNode
.withName("osc_receive2")
.withInputValue("prefix", "/*/*/<itemid:i>");
Node net2 = Node.NETWORK
.withChildAdded(oscReceiveNode2)
.withChildAdded(sortNode1)
.withRenderedChildName("sort1")
.connect("osc_receive2", "sort1", "list");
List<Map<String, Object>> expectedResult2 = ImmutableList.<Map<String, Object>>of(