final Matcher<? extends String> delegate = equalTo(message);
return new TypeSafeMatcher<Exception>() {
@Override
protected boolean matchesSafely(Exception item) {
if (item instanceof ConversionException) {
ConversionMessage message = ((ConversionException) item).getValidationMessage();
message.setBundle(ResourceBundle.getBundle("messages"));
return delegate.matches(message.getMessage());
}
return false;
}