@Override
    public ByteBuf setMedium(int index, int value) {
        throw new ReadOnlyBufferException();
    }
@Test
    public void shouldRejectSetMedium() {
        assertThrows(UnsupportedOperationException.class, new Executable() {
            @Override
            public void execute() {
                unmodifiableBuffer(EMPTY_BUFFER).setMedium(0, 0);
            }
        });
    }