this design is actually against the philosophy of hamcrest. instead, you should do something like this:

```java
Matchers.allOf(
  XhtmlMatchers.hasXPath(String.format("/versions[@prefix=\"%s\"]", key)),
  ObjectVersionListingTest.assertKeyXpath(key, versions[0]),
  ObjectVersionListingTest.assertKeyXpath(key, versions[1])
)
```

and then the static method should return an instance of `Matcher`. the best way to create it is to use `CustomMatcher`, I think