### Question:
VTuple implements Tuple, Cloneable { @Override public boolean equals(Object obj) { if (obj instanceof Tuple) { Tuple other = (Tuple) obj; return Arrays.equals(getValues(), other.getValues()); } return false; } VTuple(int size);  VTuple(Tuple tuple);  VTuple(Datum [] datum); @Override int size(); boolean contains(int fieldId); @Override boolean isNull(int fieldid); @Override void clear(); void put(int fieldId, Datum value); @Override void put(int fieldId, Datum[] values); @Override void put(int fieldId, Tuple tuple); void put(Datum [] values); Datum get(int fieldId); void setOffset(long offset); long getOffset(); @Override boolean getBool(int fieldId); @Override byte getByte(int fieldId); @Override char getChar(int fieldId); @Override byte [] getBytes(int fieldId); @Override short getInt2(int fieldId); @Override int getInt4(int fieldId); @Override long getInt8(int fieldId); @Override float getFloat4(int fieldId); @Override double getFloat8(int fieldId); Inet4Datum getIPv4(int fieldId); byte [] getIPv4Bytes(int fieldId); InetAddress getIPv6(int fieldId); byte[] getIPv6Bytes(int fieldId); @Override String getText(int fieldId); @Override Tuple clone(); String toString(); @Override int hashCode(); @Override Datum[] getValues(); @Override boolean equals(Object obj); @Expose public Datum [] values; }### Answer:
@Test public void testEquals() { Tuple t1 = new VTuple(5); Tuple t2 = new VTuple(5); t1.put(0, DatumFactory.createInt4(1)); t1.put(1, DatumFactory.createInt4(2)); t1.put(3, DatumFactory.createInt4(2)); t2.put(0, DatumFactory.createInt4(1)); t2.put(1, DatumFactory.createInt4(2)); t2.put(3, DatumFactory.createInt4(2)); assertEquals(t1,t2); Tuple t3 = new VTuple(5); t2.put(0, DatumFactory.createInt4(1)); t2.put(1, DatumFactory.createInt4(2)); t2.put(4, DatumFactory.createInt4(2)); assertNotSame(t1,t3); }