finish containsInterval with tests.