private void assertIteratorNotModifiable(FloatIterator iter) throws Exception {
    assertTrue(iter.hasNext());
    iter.next();

    try {
      iter.remove();
      fail("Expected UnsupportedOperationException");
    } catch (UnsupportedOperationException e) {
      // expected
    }
  }