@Override
  public void verifyCompatibility(WindowFn<?, ?> other) throws IncompatibleWindowException {
    if (!this.isCompatible(other)) {
      throw new IncompatibleWindowException(
          other,
          String.format(
              "Only %s objects with the same size, period and offset are compatible.",
              SlidingWindows.class.getSimpleName()));
    }
  }
@Test
  public void testVerifyCompatibility() throws IncompatibleWindowException {
    SlidingWindows.of(Duration.millis(10))
        .verifyCompatibility(SlidingWindows.of(Duration.millis(10)));
    thrown.expect(IncompatibleWindowException.class);
    SlidingWindows.of(Duration.millis(10))
        .verifyCompatibility(SlidingWindows.of(Duration.millis(20)));
  }