<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Hi,<br><br>If you don't know what ValidationResult is, check out http://www.ovirt.org/ValidationResult<br><br>In a gist, I added a new way to test this using JUnit's assertThat syntax:<br><pre>// Test that validation result is valid
assertThat(someValidation(), isValid());

// Test that validation result is invalid
assertThat(someValidation(), failsWith(VdcBllMessages.SOME_ERROR));

// Test that validation result is invalid and has replacement
assertThat(someValidation(), both(failsWith(VdcBllMessages.SOME_ERROR)).and(replacements(hasItem(EXPECTED_REPLACEMENT))));
</pre>You need to statically import ValidationResultMatchers (and the basic JUnit matchers) for this to work.<br><br>The rest I documented in the aforementioned wiki.<br><br>Check out the patch: http://gerrit.ovirt.org/#/c/13061<br><br>Or how to use it: http://gerrit.ovirt.org/#/c/13062<br><br><div><span name="x"></span>Regards,<br>Mike<span name="x"></span><br></div><br></div></body></html>