@JsonCreator
  public static WindowInfo of(
      @JsonProperty(value = "type", required = true) final WindowType type,
      @JsonProperty(value = "size") final Optional<Duration> size,
      @JsonProperty(value = "emitStrategy") final Optional<OutputRefinement> emitStrategy) {
    return new WindowInfo(type, size, emitStrategy);
  }
@Test
  public void shouldImplementEquals() {
    new EqualsTester()
        .addEqualityGroup(
            WindowInfo.of(SESSION, Optional.empty(), Optional.empty()),
            WindowInfo.of(SESSION, Optional.empty(), Optional.empty())
        )
        .addEqualityGroup(
            WindowInfo.of(TUMBLING, Optional.of(Duration.ofMillis(19)), Optional.empty()),
            WindowInfo.of(TUMBLING, Optional.of(Duration.ofMillis(19)), Optional.empty())
        )
        .addEqualityGroup(
            WindowInfo.of(HOPPING, Optional.of(Duration.ofMillis(19)), Optional.empty()),
            WindowInfo.of(HOPPING, Optional.of(Duration.ofMillis(19)), Optional.empty())
        )
        .addEqualityGroup(
            WindowInfo.of(TUMBLING, Optional.of(Duration.ofMillis(1010)), Optional.empty()),
            WindowInfo.of(TUMBLING, Optional.of(Duration.ofMillis(1010)), Optional.of(OutputRefinement.CHANGES)),
            WindowInfo.of(TUMBLING, Optional.of(Duration.ofMillis(1010)), Optional.of(OutputRefinement.FINAL))
        )
        .testEquals();
  }