TimeWindows extends Windows<TimeWindow> { public static TimeWindows of(String name, long size) { return new TimeWindows(name, size, size); } private  TimeWindows(String name, long size, long advance); static TimeWindows of(String name, long size); TimeWindows advanceBy(long interval); @Override Map<Long, TimeWindow> windowsFor(long timestamp); @Override final boolean equals(Object o); @Override int hashCode(); final long size; final long advance; }
@Test(expected = IllegalArgumentException.class) public void nameMustNotBeEmpty() { TimeWindows.of("", anySize); }
@Test(expected = IllegalArgumentException.class) public void nameMustNotBeNull() { TimeWindows.of(null, anySize); }
@Test(expected = IllegalArgumentException.class) public void windowSizeMustNotBeNegative() { TimeWindows.of(anyName, -1); }
@Test(expected = IllegalArgumentException.class) public void windowSizeMustNotBeZero() { TimeWindows.of(anyName, 0); }