### Question:
TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(final long sizeMs) throws IllegalArgumentException { if (sizeMs <= 0) { throw new IllegalArgumentException("Window size (sizeMs) must be larger than zero."); } return new TimeWindows(sizeMs, sizeMs); } private  TimeWindows(final long sizeMs, final long advanceMs); static TimeWindows of(final long sizeMs); TimeWindows advanceBy(final long advanceMs); @Override Map<Long, TimeWindow> windowsFor(final long timestamp); @Override long size(); @Override TimeWindows until(final long durationMs); @Override long maintainMs(); @Override boolean equals(final Object o); @Override int hashCode(); final long sizeMs; final long advanceMs; }### Answer:
@Test public void shouldSetWindowSize() { assertEquals(ANY_SIZE, TimeWindows.of(ANY_SIZE).sizeMs); }
@Test(expected = IllegalArgumentException.class) public void windowSizeMustNotBeZero() { TimeWindows.of(0); }
@Test(expected = IllegalArgumentException.class) public void windowSizeMustNotBeNegative() { TimeWindows.of(-1); }