@Test
  public void testOperatorToMapForTable() {
    JobGraphJsonGenerator jsonGenerator = new JobGraphJsonGenerator();
    Map<String, Object> map;
    SendToTableOperatorSpec<Object, Object> sendToTableOperatorSpec =
        OperatorSpecs.createSendToTableOperatorSpec("test-sent-to-table", "test-sent-to");
    map = jsonGenerator.operatorToMap(sendToTableOperatorSpec);
    assertTrue(map.containsKey("tableId"));
    assertEquals(map.get("tableId"), "test-sent-to-table");
    assertEquals(map.get("opCode"), OperatorSpec.OpCode.SEND_TO.name());
    assertEquals(map.get("opId"), "test-sent-to");
    StreamTableJoinOperatorSpec<String, String, String, String> streamTableJoinOperatorSpec =
        OperatorSpecs.createStreamTableJoinOperatorSpec("test-join-table", mock(StreamTableJoinFunction.class), "test-join");
    map = jsonGenerator.operatorToMap(streamTableJoinOperatorSpec);
    assertTrue(map.containsKey("tableId"));
    assertEquals(map.get("tableId"), "test-join-table");
    assertEquals(map.get("opCode"), OperatorSpec.OpCode.JOIN.name());
    assertEquals(map.get("opId"), "test-join");
  }
the graph looks like the following.
number in parentheses () indicates number of stream partitions.
number in parentheses in quotes ("") indicates expected partition count.
number in square brackets [] indicates operator ID.

input3 (32) -> filter [7] -> partitionBy [8] ("64") -> map [10] -> join [14] -> sendTo(output2) [15] (16)
                                                                  |
             input2 (16) -> partitionBy [3] ("64") -> filter [5] -| -> sink [13]
                                                                  |
                                        input1 (64) -> map [1] -> join [11] -> sendTo(output1) [12] (8)
samza-core/src/test/java/org/apache/samza/execution/TestJobGraphJsonGenerator.java