Tuple { @Override public int hashCode() { return Objects.hash(schema, Arrays.deepHashCode(values)); } Tuple(TupleSchema schema, Object[] values); Object get(String name); T get(TupleKey<T> key); Map<String, V> serialise(Function<Object, V> serialiser); Map<String, Object> toMap(); TupleSchema getSchema(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void hashing() { Tuple person = personSchema.makeWith("Dominic", 41, addressSchema.makeWith(asList("23 Acacia Avenue", "Sunderland"), "VB6 5UX")); Tuple same = personSchema.makeWith("Dominic", 41, addressSchema.makeWith(asList("23 Acacia Avenue", "Sunderland"), "VB6 5UX")); Tuple different = personSchema.makeWith("Dominic", 42, addressSchema.makeWith(asList("23 Acacia Avenue", "Sunderland"), "VB6 5UX")); assertThat(person.hashCode(), equalTo(same.hashCode())); assertThat(person.hashCode(), not(equalTo(different.hashCode()))); }