@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(expected = IllegalArgumentException.class)
  public void shouldThrowIfSizeProvidedButNotRequired() {
    WindowInfo.of(SESSION, Optional.of(Duration.ofSeconds(10)), Optional.empty());
  }