def METHOD_NAME(self):
    ref = list(range(10))
    # When the underlying iterable is longer than the CountingIterator,
    # the remaining items in the iterable should be ignored
    itr = iterators.CountingIterator(ref, total=8)
    self.assertEqual(list(itr), ref[:8])
    # When the underlying iterable is shorter than the CountingIterator,
    # raise an IndexError when the underlying iterable is exhausted
    itr = iterators.CountingIterator(ref, total=12)
    self.assertRaises(IndexError, list, itr)