AbstractRangeTree implements RangeTree<C> { @Override public Iterable<Range<C>> query(final C location) { return intersect(Range.singleton(location)); }  @Override boolean isEmpty(); @Override boolean contains(final C location); @Override int count(final C location); @Override Iterable<Range<C>> query(final C location); @Override int count(final Range<C> query); @Override boolean intersects(final Range<C> query); @Override Iterable<Set<Range<C>>> intersect(final Iterable<Range<C>> query); @Override boolean intersects(final Iterable<Range<C>> query);  }
@Test public void testQuerySingletonHit() { assertEquals(1, Iterables.size(create(singleton).query(1))); }
@Test public void testQueryDense() { assertEquals(5, Iterables.size(create(dense).query(4))); }
@Test public void testQuerySparse() { assertEquals(1, Iterables.size(create(sparse).query(4))); }