### Question:
SuBinary { @Override public int hashCode() { int result = type.hashCode(); result = 31 * result + (path != null ? path.hashCode() : 0); result = 31 * result + (extra != null ? extra.hashCode() : 0); result = 31 * result + (version != null ? version.hashCode() : 0); result = 31 * result + (raw != null ? raw.hashCode() : 0); return result; } SuBinary(Type type, @Nullable String path, @Nullable String version, @Nullable String extra, List<String> raw); @NonNull Type getType(); @Nullable String getPath(); String getExtra(); @Nullable String getVersion(); List<String> getRaw(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testEqualsHash() { SuBinary binary1 = new SuBinary(SuBinary.Type.SE_SUPERUSER, "/su/bin/su", "16", "me.phh.superuser cm-su", new ArrayList<>()); SuBinary binary2 = new SuBinary(SuBinary.Type.SE_SUPERUSER, "/su/bin/su", "16", "me.phh.superuser cm-su", new ArrayList<>()); SuBinary binary3 = new SuBinary(SuBinary.Type.UNKNOWN, null, null, null, null); assertThat(binary1, is(binary2)); assertThat(binary2, is(not(binary3))); assertThat(binary1.hashCode(), is(binary2.hashCode())); assertThat(binary2.hashCode(), is(not(binary3.hashCode()))); }