@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 shouldNotOverlapIsOtherWindowIsAfterThisWindow() {
        /*
         * This:        [-------)
         * Other:               [------)
         */
        assertFalse(window.overlap(new TimeWindow(end, end + 1)));
        assertFalse(window.overlap(new TimeWindow(end, 150)));
        assertFalse(window.overlap(new TimeWindow(end + 1, 150)));
        assertFalse(window.overlap(new TimeWindow(125, 150)));
    }