@Test
public void testOverlappingWindows() {

    Observable<String> subject = Observable.from(new String[] { "zero", "one", "two", "three", "four", "five" }, Schedulers.currentThread());
    Observable<Observable<String>> windowed = Observable.create(window(subject, 3, 1));
    List<List<String>> windows = toLists(windowed);
    assertEquals(6, windows.size());
    assertEquals(list("zero", "one", "two"), windows.get(0));
    assertEquals(list("one", "two", "three"), windows.get(1));
    assertEquals(list("two", "three", "four"), windows.get(2));
    assertEquals(list("three", "four", "five"), windows.get(3));
    assertEquals(list("four", "five"), windows.get(4));
    assertEquals(list("five"), windows.get(5));
}