public static <K, ElemT> KeyedWorkItemCoder<K, ElemT> of(
      Coder<K> keyCoder, Coder<ElemT> elemCoder, Coder<? extends BoundedWindow> windowCoder) {
    return new KeyedWorkItemCoder<>(keyCoder, elemCoder, windowCoder);
  }
@Test
  public void testEncodeDecodeEqual() throws Exception {
    Iterable<TimerData> timers =
        ImmutableList.of(
            TimerData.of(
                StateNamespaces.global(),
                new Instant(500L),
                new Instant(500L),
                TimeDomain.EVENT_TIME));
    Iterable<WindowedValue<Integer>> elements =
        ImmutableList.of(
            WindowedValue.valueInGlobalWindow(1),
            WindowedValue.valueInGlobalWindow(4),
            WindowedValue.valueInGlobalWindow(8));

    KeyedWorkItemCoder<String, Integer> coder =
        KeyedWorkItemCoder.of(StringUtf8Coder.of(), VarIntCoder.of(), GlobalWindow.Coder.INSTANCE);

    CoderProperties.coderDecodeEncodeEqual(coder, KeyedWorkItems.workItem("foo", timers, elements));
    CoderProperties.coderDecodeEncodeEqual(coder, KeyedWorkItems.elementsWorkItem("foo", elements));
    CoderProperties.coderDecodeEncodeEqual(coder, KeyedWorkItems.timersWorkItem("foo", timers));
  }