description.appendText("links to self");
}
@Override
public boolean matchesSafely(final T item) {
final LinksToSelf initialRepr = (LinksToSelf) item; // no easy
// way to do
// this with
// Hamcrest
// when
try {
final RestfulResponse<T> followedResp = client.followT(initialRepr.getSelf());
// then
final T repr2 = followedResp.getEntity();
final LinksToSelf repr2AsLinksToSelf = (LinksToSelf) repr2;
return initialRepr.getSelf().equals(repr2AsLinksToSelf.getSelf());
} catch (final Exception e) {
throw new RuntimeException(e);
}
}
};