### Question:
PageCursorUtil { static void put6BLong( PageCursor cursor, long value ) { if ( (value & ~_6B_MASK) != 0 ) { throw new IllegalArgumentException( "Illegal 6B value " + value ); } int lsb = (int) value; short msb = (short) (value >>> Integer.SIZE); cursor.putInt( lsb ); cursor.putShort( msb ); } private  PageCursorUtil();   }### Answer:
@Test void shouldFailOnInvalidValues() { PageCursor cursor = ByteArrayPageCursor.wrap( 10 ); for ( int i = 0; i < 1_000; ) { long expected = random.nextLong(); if ( (expected & ~_6B_MASK) != 0 ) { cursor.setOffset( 0 ); assertThrows( IllegalArgumentException.class, () -> PageCursorUtil.put6BLong( cursor, expected ) ); i++; } } }