@Test public void hashCodeDiffersWhenPidDiffers() { NativeProcessImpl a = new NativeProcessImpl(6712, "yuss", "boii"); NativeProcessImpl b = new NativeProcessImpl(8233, "yuss", "boii"); assertNotEquals(a.hashCode(), b.hashCode()); }
@Override public int hashCode() { return Objects.hash(pid, description, owner); }
NativeProcessImpl implements NativeProcess { @Override public int hashCode() { return Objects.hash(pid, description, owner); } }
NativeProcessImpl implements NativeProcess { @Override public int hashCode() { return Objects.hash(pid, description, owner); } NativeProcessImpl();  NativeProcessImpl(int pid, String description, String owner); }
NativeProcessImpl implements NativeProcess { @Override public int hashCode() { return Objects.hash(pid, description, owner); } NativeProcessImpl();  NativeProcessImpl(int pid, String description, String owner); @Override int getPid(); @Override void setPid(int pid); @Override String getDescription(); @Override void setDescription(String description); @Override String getOwner(); @Override void setOwner(String owner); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
NativeProcessImpl implements NativeProcess { @Override public int hashCode() { return Objects.hash(pid, description, owner); } NativeProcessImpl();  NativeProcessImpl(int pid, String description, String owner); @Override int getPid(); @Override void setPid(int pid); @Override String getDescription(); @Override void setDescription(String description); @Override String getOwner(); @Override void setOwner(String owner); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }