public static PaneInfo createPane(boolean isFirst, boolean isLast, Timing timing) {
    checkArgument(isFirst, "Indices must be provided for non-first pane info.");
    return createPane(isFirst, isLast, timing, 0, timing == Timing.EARLY ? -1 : 0);
  }
@Test
  public void testEncodingRoundTrip() throws Exception {
    Coder<PaneInfo> coder = PaneInfo.PaneInfoCoder.INSTANCE;
    for (Timing timing : Timing.values()) {
      long onTimeIndex = timing == Timing.EARLY ? -1 : 37;
      CoderProperties.coderDecodeEncodeEqual(
          coder, PaneInfo.createPane(false, false, timing, 389, onTimeIndex));
      CoderProperties.coderDecodeEncodeEqual(
          coder, PaneInfo.createPane(false, true, timing, 5077, onTimeIndex));
      CoderProperties.coderDecodeEncodeEqual(coder, PaneInfo.createPane(true, false, timing, 0, 0));
      CoderProperties.coderDecodeEncodeEqual(coder, PaneInfo.createPane(true, true, timing, 0, 0));
    }
  }