public void byteOrder(final ByteOrder byteOrder)
    {
        if (null == byteOrder)
        {
            throw new IllegalArgumentException("byteOrder cannot be null");
        }

        this.byteOrder = byteOrder;
    }
@Test
    void shouldThrowExceptionWhenCannotReadString() throws Throwable
    {
        final UnsafeBuffer buffer = toUnsafeBuffer((out) -> out.writeShort(42));

        final DirectBufferDataInput dataInput = new DirectBufferDataInput(buffer);
        dataInput.byteOrder(byteOrder());

        assertThrows(EOFException.class, dataInput::readUTF);
    }