@Override
    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 TimeWindow otherWindow = (TimeWindow) other;
        return startMs < otherWindow.endMs && otherWindow.startMs < endMs;
    }
@Test
    public void shouldOverlapIfOtherWindowStartIsWithinThisWindow() {
        /*
         * This:        [-------)
         * Other:           [-------)
         */
        assertTrue(window.overlap(new TimeWindow(start, end + 1)));
        assertTrue(window.overlap(new TimeWindow(start, 150)));
        assertTrue(window.overlap(new TimeWindow(75, end + 1)));
        assertTrue(window.overlap(new TimeWindow(75, 150)));
    }