ConditionalPlaceRequest extends DefaultPlaceRequest { @Override public boolean equals(final Object o) { if (o == null) { return false; } if (!(o instanceof DefaultPlaceRequest)) { return false; } if (this == o) { return true; } PlaceRequest that = (PlaceRequest) o; if (o instanceof ConditionalPlaceRequest) { that = ((ConditionalPlaceRequest) o).resolveConditionalPlaceRequest(); } if (invalidConditionalPlaceRequest()) { return super.equals(that); } if (predicate == null || predicate.test(this)) { return super.equals(that); } else { return resolve().equals(that); } } ConditionalPlaceRequest();  ConditionalPlaceRequest(final String identifier);  ConditionalPlaceRequest(final String identifier,
                                   final Map<String, String> parameters); ConditionalPlaceRequest when(Predicate<PlaceRequest> predicate); PlaceRequest orElse(PlaceRequest orElsePlaceRequest); PlaceRequest resolveConditionalPlaceRequest(); @Override String getIdentifier(); @Override Map<String, String> getParameters(); @Override PlaceRequest clone(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void defaultPlaceRequestEqualsToIncompleteConditionalPlaceRequest() { final DefaultPlaceRequest defaultPlaceRequest = new DefaultPlaceRequest("my"); final PlaceRequest conditionalPlaceRequest = new ConditionalPlaceRequest("my"); equals(defaultPlaceRequest, conditionalPlaceRequest); }