ArrayByteSequence implements Serializable, Comparable<ArrayByteSequence> { public byte byteAt(final int i) { if (i < 0) { throw new IllegalArgumentException("i < 0, " + i); } else if (i >= this.length) { throw new IllegalArgumentException("i >= length, " + i + " >= " + this.length); } else { return this.data[this.offset + i]; } } ArrayByteSequence(final byte[] data);  ArrayByteSequence(final byte[] data, final int offset, final int length);  ArrayByteSequence(final String s);  ArrayByteSequence(final ByteBuffer buffer); byte byteAt(final int i); byte[] getBackingArray(); boolean isBackedByArray(); int length(); int offset(); byte[] toArray(); String toString(); ArrayByteSequence subSequence(final int start, final int end); static int compareBytes(final ArrayByteSequence bs1, final ArrayByteSequence bs2); int compareTo(final ArrayByteSequence obs); boolean equals(final Object o); int hashCode();  }
@Test public void testInvalidByteAt0ShouldThrowIAX() { assertThrows(IllegalArgumentException.class, () -> abs.byteAt(-1)); }
@Test public void testInvalidByteAt1ShouldThrowIAX() { assertThrows(IllegalArgumentException.class, () -> abs.byteAt(data.length)); }