public boolean overlap(final Window other) throws IllegalArgumentException {
        if (getClass() != other.getClass()) {
            throw new IllegalArgumentException("Cannot compare windows of different type. Other window has type "
                + other.getClass() + ".");
        }
        final SessionWindow otherWindow = (SessionWindow) other;
        return !(otherWindow.endMs < startMs || endMs < otherWindow.startMs);
    }
@Test
    public void shouldOverlapIfOtherWindowIsWithinThisWindow() {
        /*
         * This:        [-------]
         * Other:         [---]
         */
        assertTrue(window.overlap(new SessionWindow(start, start)));
        assertTrue(window.overlap(new SessionWindow(start, 75)));
        assertTrue(window.overlap(new SessionWindow(start, end)));
        assertTrue(window.overlap(new SessionWindow(75, end)));
        assertTrue(window.overlap(new SessionWindow(end, end)));
    }