### Question:
PrimitiveLongCollections { public static int indexOf(PrimitiveLongIterator iterator, long item) { for (int i = 0; iterator.hasNext(); i++) { if (item == iterator.next()) { return i; } } return -1; } private  PrimitiveLongCollections(); static PrimitiveLongIterator iterator(final long... items); static PrimitiveLongIterator concat(PrimitiveLongIterator... primitiveLongIterators); static PrimitiveLongIterator concat(Iterable<PrimitiveLongIterator> primitiveLongIterators); static PrimitiveLongIterator filter(PrimitiveLongIterator source, final LongPredicate filter); static PrimitiveLongResourceIterator filter(
        PrimitiveLongResourceIterator source,
        final LongPredicate filter
    ); static PrimitiveLongIterator range(long start, long end); static long single(PrimitiveLongIterator iterator, long defaultItem); static int indexOf(PrimitiveLongIterator iterator, long item); static int count(PrimitiveLongIterator iterator); static long[] asArray(PrimitiveLongIterator iterator); static long[] asArray(Iterator<Long> iterator); static PrimitiveLongIterator emptyIterator(); static PrimitiveLongIterator toPrimitiveIterator(final Iterator<Long> iterator); static Iterator<T> map(final LongFunction<T> mapFunction, final PrimitiveLongIterator source); static List<Long> asList(PrimitiveLongIterator iterator); static Iterator<Long> toIterator(final PrimitiveLongIterator primIterator); static PrimitiveLongResourceIterator resourceIterator(
        final PrimitiveLongIterator iterator,
        final Resource resource
    ); static Set<Long> toSet(PrimitiveLongSet set); static Set<Long> toSet(PrimitiveLongIterator iterator); static long[] deduplicate(long[] values); static final long[] EMPTY_LONG_ARRAY; }### Answer:
@Test void indexOf() { PrimitiveLongIterable items = () -> PrimitiveLongCollections.iterator(10, 20, 30); assertEquals(-1, PrimitiveLongCollections.indexOf(items.iterator(), 55)); assertEquals(0, PrimitiveLongCollections.indexOf(items.iterator(), 10)); assertEquals(1, PrimitiveLongCollections.indexOf(items.iterator(), 20)); assertEquals(2, PrimitiveLongCollections.indexOf(items.iterator(), 30)); }