@Override
  public void verifyCompatibility(WindowFn<?, ?> other) throws IncompatibleWindowException {
    if (!this.isCompatible(other)) {
      throw new IncompatibleWindowException(
          other,
          String.format(
              "%s is only compatible with %s.",
              Sessions.class.getSimpleName(), Sessions.class.getSimpleName()));
    }
  }
@Test
  public void testVerifyCompatibility() throws IncompatibleWindowException {
    Sessions.withGapDuration(Duration.millis(10))
        .verifyCompatibility(Sessions.withGapDuration(Duration.millis(10)));

    thrown.expect(IncompatibleWindowException.class);
    Sessions.withGapDuration(Duration.millis(10))
        .verifyCompatibility(FixedWindows.of(Duration.millis(10)));
  }