### Question:
Input implements Serializable { public Input setId(long id) { this.id = id; return this; } Input();  Input(String name); @Id @GeneratedValue long getId(); Input setId(long id); String getName(); void setName(String name); @XmlTransient @JsonIgnore @ManyToMany(fetch = FetchType.EAGER, mappedBy = "inputs", cascade = CascadeType.ALL) List<Execution> getExecutions(); @XmlTransient @JsonIgnore void setExecutions(List<Execution> executions); @Override boolean equals(Object o); @Override int hashCode(); @Transient String getIdentifier();  }### Answer:
@Test public void testEqualsAndHashCode() { int id = 42; Input input = new Input("input") .setId(id); Input equalInput = new Input("input") .setId(id); Input notEqualInput = new Input("input") .setId(23); new EqualsAndHashCodeTester<Input>() .performBasicEqualsAndHashCodeChecks(input, equalInput, notEqualInput); }