### Question:
Utils { static <T> Iterator<T> advancePast(@NonNull Iterator<T> iterator, @NonNull T element) { Preconditions.checkNotNull(iterator); Preconditions.checkNotNull(element); while (iterator.hasNext()) { if (iterator.next() == element) { break; } } Preconditions.checkArgument(iterator.hasNext()); return iterator; } private  Utils(); static ImmutableBiMap<Class<?>, String> buildClassToTableMap(ModelGraph<TModel> modelGraph);  }### Answer:
@Test public void shouldAdvanceIteratorPastGivenElement() throws Exception { Iterator<Integer> advancedIterator = Utils.advancePast(ImmutableList.of(1, 2, 3, 4).iterator(), 2); ImmutableList<Integer> advancedList = ImmutableList.copyOf(advancedIterator); assertThat(advancedList).containsExactly(3, 4).inOrder(); }
@Test(expected = NullPointerException.class) public void shouldFailIfIteratorIsNull() throws Exception { Utils.advancePast(null, 1); }
@Test(expected = NullPointerException.class) public void shouldFailIfGivenElementIsNull() throws Exception { Utils.advancePast(ImmutableList.of(1, 2, 3).iterator(), null); }
@Test(expected = IllegalArgumentException.class) public void shouldFailIfIteratorDoesNotContainGivenElement() throws Exception { Utils.advancePast(ImmutableList.of(1, 2, 3).iterator(), 4); }