### Question:
CopyBranchRequest extends ChangeRequest { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (this.getClass().isInstance(obj)) { CopyBranchRequest that = (CopyBranchRequest)obj; if (!this.from().isSame(that.from())) return false; if (!this.into().isSame(that.into())) return false; if (!this.nodeConflictBehavior().equals(that.nodeConflictBehavior())) return false; if (!this.fromWorkspace.equals(that.fromWorkspace)) return false; if (!this.intoWorkspace.equals(that.intoWorkspace)) return false; return true; } return false; } CopyBranchRequest( Location from,
                              String fromWorkspace,
                              Location into,
                              String intoWorkspace );  CopyBranchRequest( Location from,
                              String fromWorkspace,
                              Location into,
                              String intoWorkspace,
                              Name nameForCopy );  CopyBranchRequest( Location from,
                              String fromWorkspace,
                              Location into,
                              String intoWorkspace,
                              Name nameForCopy,
                              NodeConflictBehavior nodeConflictBehavior ); Location from(); Location into(); String fromWorkspace(); String intoWorkspace(); boolean isSameWorkspace(); Name desiredName(); @Override boolean isReadOnly(); NodeConflictBehavior nodeConflictBehavior(); void setActualLocations( Location fromLocation,
                                    Location intoLocation ); Location getActualLocationBefore(); Location getActualLocationAfter(); @Override boolean changes( String workspace,
                            Path path ); @Override Location changedLocation(); @Override String changedWorkspace(); @Override int hashCode(); @Override void cancel(); @Override boolean equals( Object obj ); @Override String toString(); @Override CopyBranchRequest clone(); @Override RequestType getType(); static final NodeConflictBehavior DEFAULT_NODE_CONFLICT_BEHAVIOR; }### Answer:
@Test public void shouldConsiderNotEqualTwoRequestsWithDifferentLocations() { request = new CopyBranchRequest(validPathLocation1, workspace1, validPathLocation2, workspace2); CopyBranchRequest request2 = new CopyBranchRequest(validPathLocation2, workspace1, validPathLocation1, workspace2); assertThat(request.equals(request2), is(false)); }
@Test public void shouldConsiderNotEqualTwoRequestsWithDifferentFromWorkspaceName() { request = new CopyBranchRequest(validPathLocation1, workspace1 + "a", validPathLocation2, workspace2); CopyBranchRequest request2 = new CopyBranchRequest(validPathLocation1, workspace1, validPathLocation2, workspace2); assertThat(request.equals(request2), is(false)); }
@Test public void shouldConsiderNotEqualTwoRequestsWithDifferentToWorkspaceName() { request = new CopyBranchRequest(validPathLocation1, workspace1, validPathLocation2, workspace2 + "a"); CopyBranchRequest request2 = new CopyBranchRequest(validPathLocation1, workspace1, validPathLocation2, workspace2); assertThat(request.equals(request2), is(false)); }