@Test public void removeIntervalsAndCacheDoesNothingWhenOtherIntervalsIsEmpty() { CompoundInterval ci = createCompoundIntervalWithoutRegister(); ci.add(new MappedBasicInterval(DEFAULT_END + 1, DEFAULT_END + 2, null)); ci.add(new MappedBasicInterval(DEFAULT_END + 2, DEFAULT_END + 3, null)); CompoundInterval cached = ci.removeIntervalsAndCache(new CompoundInterval(null)); assertThat(ci.size(), is(3)); assertThat(cached.isEmpty(), is(true)); }