To test if my code is throwing expected exception I use the following syntax:
an [IllegalArgumentException] should be thrownBy(Algorithms.create(degree))
is there any way to test if thrown exception contains expected message like:
an [IllegalArgumentException(expectedMessage)] should be thrownBy(Algorithms.create(degree)) -- what doesn't compile
?