### Question:
ReadOnlyChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer { public void setByte(int index, int value) { throw new ReadOnlyBufferException(); } ReadOnlyChannelBuffer(ChannelBuffer buffer); private  ReadOnlyChannelBuffer(ReadOnlyChannelBuffer buffer); ChannelBuffer unwrap(); ChannelBufferFactory factory(); ByteOrder order(); boolean isDirect(); boolean hasArray(); byte[] array(); int arrayOffset(); @Override void discardReadBytes(); void setByte(int index, int value); void setBytes(int index, ChannelBuffer src, int srcIndex, int length); void setBytes(int index, byte[] src, int srcIndex, int length); void setBytes(int index, ByteBuffer src); void setShort(int index, int value); void setMedium(int index, int value); void setInt(int index, int value); void setLong(int index, long value); int setBytes(int index, InputStream in, int length); int setBytes(int index, ScatteringByteChannel in, int length); int getBytes(int index, GatheringByteChannel out, int length); void getBytes(int index, OutputStream out, int length); void getBytes(int index, byte[] dst, int dstIndex, int length); void getBytes(int index, ChannelBuffer dst, int dstIndex, int length); void getBytes(int index, ByteBuffer dst); ChannelBuffer duplicate(); ChannelBuffer copy(int index, int length); ChannelBuffer slice(int index, int length); byte getByte(int index); short getShort(int index); int getUnsignedMedium(int index); int getInt(int index); long getLong(int index); ByteBuffer toByteBuffer(int index, int length); @Override ByteBuffer[] toByteBuffers(int index, int length); int capacity();  }### Answer:
@Test(expected = UnsupportedOperationException.class) public void shouldRejectSetByte() { unmodifiableBuffer(EMPTY_BUFFER).setByte(0, (byte) 0); }