@Test
  public void testMaxPartition() {
    Collection<StreamEdge> edges = new ArrayList<>();
    StreamEdge edge = new StreamEdge(input1Spec, false, false, config);
    edge.setPartitionCount(2);
    edges.add(edge);
    edge = new StreamEdge(input2Spec, false, false, config);
    edge.setPartitionCount(32);
    edges.add(edge);
    edge = new StreamEdge(input3Spec, false, false, config);
    edge.setPartitionCount(16);
    edges.add(edge);

    assertEquals(32, IntermediateStreamManager.maxPartitions(edges));

    edges = Collections.emptyList();
    assertEquals(StreamEdge.PARTITIONS_UNKNOWN, IntermediateStreamManager.maxPartitions(edges));
  }
A special example of stream-table join where a stream is joined with a table, and the result is
sent to the same table. This example is necessary to ensure {@link ExecutionPlanner} does not
get stuck traversing the virtual cycle between stream-table-join and send-to-table operator specs
indefinitely.

The reason such virtual cycle is present is to support computing partitions of intermediate
streams participating in stream-table joins. Please, refer to SAMZA SEP-16 for more details.
samza-core/src/test/java/org/apache/samza/execution/TestExecutionPlanner.java