### Question:
RenameNodeRequest extends ChangeRequest { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (this.getClass().isInstance(obj)) { RenameNodeRequest that = (RenameNodeRequest)obj; if (!this.at().isSame(that.at())) return false; if (!this.toName().equals(that.toName())) return false; if (!this.inWorkspace().equals(that.inWorkspace())) return false; return true; } return false; } RenameNodeRequest( Location at,
                              String workspaceName,
                              Name newName ); @Override boolean isReadOnly(); Location at(); String inWorkspace(); Name toName(); void setActualLocations( Location oldLocation,
                                    Location newLocation ); Location getActualLocationBefore(); Location getActualLocationAfter(); @Override boolean changes( String workspace,
                            Path path ); @Override Location changedLocation(); @Override String changedWorkspace(); @Override void cancel(); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString(); @Override RenameNodeRequest clone(); @Override RequestType getType();  }### Answer:
@Test public void shouldConsiderNotEqualTwoRequestsWithDifferentLocations() { request = new RenameNodeRequest(validPathLocation1, workspace1, newName); RenameNodeRequest request2 = new RenameNodeRequest(validPathLocation2, workspace1, newName); assertThat(request.equals(request2), is(false)); }
@Test public void shouldConsiderNotEqualTwoRequestsWithDifferentWorkspaceNames() { request = new RenameNodeRequest(validPathLocation1, workspace1, newName); RenameNodeRequest request2 = new RenameNodeRequest(validPathLocation1, workspace2, newName); assertThat(request.equals(request2), is(false)); }
@Test public void shouldConsiderNotEqualTwoRequestsWithSameLocationsAndDifferentNames() { request = new RenameNodeRequest(validPathLocation1, workspace1, newName); RenameNodeRequest request2 = new RenameNodeRequest(validPathLocation1, workspace1, createName("OtherName")); assertThat(request.equals(request2), is(false)); }