### Question:
ReadAllPropertiesRequest extends CacheableRequest implements Iterable<Property> { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (this.getClass().isInstance(obj)) { ReadAllPropertiesRequest that = (ReadAllPropertiesRequest)obj; if (!this.at().isSame(that.at())) return false; if (!this.inWorkspace().equals(that.inWorkspace())) return false; return true; } return false; } ReadAllPropertiesRequest( Location at,
                                     String workspaceName ); @Override boolean isReadOnly(); Location at(); String inWorkspace(); Map<Name, Property> getPropertiesByName(); Collection<Property> getProperties(); Iterator<Property> iterator(); Property addProperty( Property property ); void addProperties( Property... properties ); void addProperties( Iterable<Property> properties ); int getNumberOfChildren(); void setNumberOfChildren( int numberOfChildren ); void setActualLocationOfNode( Location actual ); Location getActualLocationOfNode(); @Override void cancel(); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString(); @Override RequestType getType(); static final int UNKNOWN_NUMBER_OF_CHILDREN; }### Answer:
@Test public void shouldConsiderNotEqualTwoRequestsWithDifferentLocations() { request = new ReadAllPropertiesRequest(validPathLocation1, workspace1); ReadAllPropertiesRequest request2 = new ReadAllPropertiesRequest(validPathLocation2, workspace1); assertThat(request.equals(request2), is(false)); }
@Test public void shouldConsiderNotEqualTwoRequestsWithDifferentWorkspaceNames() { request = new ReadAllPropertiesRequest(validPathLocation1, workspace1); ReadAllPropertiesRequest request2 = new ReadAllPropertiesRequest(validPathLocation1, workspace2); assertThat(request.equals(request2), is(false)); }