### Question:
AbstractChannelBuffer implements ChannelBuffer { @Override public ChannelBuffer copy() { return copy(readerIndex, readableBytes()); }  @Override int readerIndex(); @Override void readerIndex(int readerIndex); @Override int writerIndex(); @Override void writerIndex(int writerIndex); @Override void setIndex(int readerIndex, int writerIndex); @Override void clear(); @Override boolean readable(); @Override boolean writable(); @Override int readableBytes(); @Override int writableBytes(); @Override void markReaderIndex(); @Override void resetReaderIndex(); @Override void markWriterIndex(); @Override void resetWriterIndex(); @Override void discardReadBytes(); @Override void ensureWritableBytes(int writableBytes); @Override void getBytes(int index, byte[] dst); @Override void getBytes(int index, ChannelBuffer dst); @Override void getBytes(int index, ChannelBuffer dst, int length); @Override void setBytes(int index, byte[] src); @Override void setBytes(int index, ChannelBuffer src); @Override void setBytes(int index, ChannelBuffer src, int length); @Override byte readByte(); @Override ChannelBuffer readBytes(int length); @Override void readBytes(byte[] dst, int dstIndex, int length); @Override void readBytes(byte[] dst); @Override void readBytes(ChannelBuffer dst); @Override void readBytes(ChannelBuffer dst, int length); @Override void readBytes(ChannelBuffer dst, int dstIndex, int length); @Override void readBytes(ByteBuffer dst); @Override void readBytes(OutputStream out, int length); @Override void skipBytes(int length); @Override void writeByte(int value); @Override void writeBytes(byte[] src, int srcIndex, int length); @Override void writeBytes(byte[] src); @Override void writeBytes(ChannelBuffer src); @Override void writeBytes(ChannelBuffer src, int length); @Override void writeBytes(ChannelBuffer src, int srcIndex, int length); @Override void writeBytes(ByteBuffer src); @Override int writeBytes(InputStream in, int length); @Override ChannelBuffer copy(); @Override ByteBuffer toByteBuffer(); @Override boolean equals(Object o); @Override int compareTo(ChannelBuffer that); @Override String toString();  }### Answer:
@Test public void copyBoundaryCheck1() { Assertions.assertThrows(IndexOutOfBoundsException.class, () -> buffer.copy(-1, 0)); }
@Test public void copyBoundaryCheck2() { Assertions.assertThrows(IndexOutOfBoundsException.class, () -> buffer.copy(0, buffer.capacity() + 1)); }
@Test public void copyBoundaryCheck3() { Assertions.assertThrows(IndexOutOfBoundsException.class, () -> buffer.copy(buffer.capacity() + 1, 0)); }
@Test public void copyBoundaryCheck4() { Assertions.assertThrows(IndexOutOfBoundsException.class, () -> buffer.copy(buffer.capacity(), 1)); }