### Question:
PrimitiveLongList implements PrimitiveLongCollection { public long get( int position ) { if ( position >= size ) { throw new IndexOutOfBoundsException( "Requested element: " + position + ", list size: " + size ); } return elements[position]; } PrimitiveLongList();   PrimitiveLongList( int size ); void add( long element ); long get( int position ); @Override boolean isEmpty(); @Override void clear(); @Override int size(); @Override void close(); @Override PrimitiveLongIterator iterator(); @Override void visitKeys( PrimitiveLongVisitor<E> visitor ); long[] toArray();  }### Answer:
@Test void throwExceptionOnAccessingNonExistentElement() { PrimitiveLongList longList = new PrimitiveLongList(); assertThrows( IndexOutOfBoundsException.class, () -> longList.get( 0 ) ); }