### Question:
User implements Serializable, Cloneable { @Override protected Object clone() throws CloneNotSupportedException { return this; } User(String name, int id);  User(); String getName(); void setName(String name); int getId(); void setId(int id);  }### Answer:
@Test public void givenUserInstance_whenCopiedWithClone_thenExactMatchIsCreated() throws CloneNotSupportedException { User user = new User("Alice", 3); User clonedUser = (User) user.clone(); assertThat(clonedUser).isEqualTo(user); }