edb30aea66
Instead of catching the expected exception and calling fail() when the exception is not raised, use the ExpectedException.expect() rule to confirm that the expected exception is raised. In cases where a specific exception message is expected, instead of catching the exception and then asserting on the value returned from its getMessage(), use the ExpectedException.expectMessage() rule. Change-Id: I15a61bbed33e11f77c5d0fac02374630f540a68e