### Question:
ListByte implements ListNumber, CollectionByte { @Override public int hashCode() { int result = 1; for (int i = 0; i < size(); i++) { result = 31 * result + getShort(i); } return result; }  @Override IteratorByte iterator(); @Override double getDouble(int index); @Override float getFloat(int index); @Override long getLong(int index); @Override int getInt(int index); @Override short getShort(int index); @Override void setDouble(int index, double value); @Override void setFloat(int index, float value); @Override void setLong(int index, long value); @Override void setInt(int index, int value); @Override void setShort(int index, short value); @Override void setByte(int index, byte value); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void hashcode1() { ListByte coll = new ListByte() { @Override public int size() { return 10; } @Override public byte getByte(int index) { return (byte) index; } }; ListByte other = new ArrayByte(new byte[] {0,1,2,3,4,5,6,7,8,9}); assertThat(coll.hashCode(), equalTo(other.hashCode())); assertThat(coll.hashCode(), equalTo(Arrays.hashCode(new byte[] {0,1,2,3,4,5,6,7,8,9}))); }