BinarySearchIterator { public void lower() { high = mid - 1; } BinarySearchIterator(int low, int high);  BinarySearchIterator(); int next(); void lower(); void higher(); boolean hasNext(); void reset(int high, int low);  }
@Test void testLower() { BinarySearchIterator iterator = new BinarySearchIterator(0, 15); int mid = Integer.MAX_VALUE; while(iterator.hasNext()) { int next = iterator.next(); assertTrue(next < mid); mid = next; iterator.lower(); } assertEquals(0, mid); }