### Question:
ArrayByteSource extends BeanByteSource implements ImmutableBean, Serializable { public static ArrayByteSource copyOf(byte[] array) { return new ArrayByteSource(array.clone()); } private  ArrayByteSource(byte[] array);   ArrayByteSource(byte[] array, String fileName); static ArrayByteSource copyOf(byte[] array); static ArrayByteSource copyOf(byte[] array, int fromIndex); static ArrayByteSource copyOf(byte[] array, int fromIndexInclusive, int toIndexExclusive); static ArrayByteSource ofUnsafe(byte[] array); static ArrayByteSource ofUtf8(String str); static ArrayByteSource from(ByteSource other); static ArrayByteSource from(CheckedSupplier<InputStream> inputStreamSupplier); static ArrayByteSource from(InputStream inputStream); static ArrayByteSource from(InputStream inputStream, int expectedSize); static ArrayByteSource fromBase64(String base64); static ArrayByteSource fromHex(String hex); @Override MetaBean metaBean(); @Override Optional<String> getFileName(); ArrayByteSource withFileName(String fileName); byte[] readUnsafe(); @Override String readUtf8(); @Override String readUtf8UsingBom(); @Override CharSource asCharSourceUtf8UsingBom(); @Override HashCode hash(HashFunction hashFunction); @Deprecated ArrayByteSource toMd5(); @Deprecated ArrayByteSource toSha512(); @Override ArrayByteSource toBase64(); @Override String toBase64String(); String toHexString(); @Override ByteArrayInputStream openStream(); @Override ByteArrayInputStream openBufferedStream(); @Override boolean isEmpty(); @Override com.google.common.base.Optional<Long> sizeIfKnown(); @Override long size(); @Override ArrayByteSource slice(long offset, long length); @Override long copyTo(OutputStream output); @Override byte[] read(); @Override T read(ByteProcessor<T> processor); @Override boolean contentEquals(ByteSource other); @Override ArrayByteSource load(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static final ArrayByteSource EMPTY; }### Answer:
@Test public void test_copyOf_fromTo_bad() { byte[] bytes = {1, 2, 3}; assertThatExceptionOfType(IndexOutOfBoundsException.class).isThrownBy(() -> ArrayByteSource.copyOf(bytes, -1, 2)); assertThatExceptionOfType(IndexOutOfBoundsException.class).isThrownBy(() -> ArrayByteSource.copyOf(bytes, 0, 4)); assertThatExceptionOfType(IndexOutOfBoundsException.class).isThrownBy(() -> ArrayByteSource.copyOf(bytes, 4, 5)); }