When the code under test in a unit test throws an exception, the test itself fails. Therefore, there is no need to surround the tested code with a ``++try++``-``++catch++`` structure to detect failure. Instead, you can simply move the exception type to the method signature.
@[~ann.campbell.2] : I will update the https://github.com/SonarSource/sonar-java/pull/902[PR] with your last modifications ASAP (I need update an https://github.com/SonarSource/orchestrator/pull/1[orchestrator PR] before) ; but IMO a remediation cost to 1min (perhaps 2) would be better than 5 (this is a default very quick to fix).
=== on 29 Jun 2016, 21:30:35 Ann Campbell wrote:
Just now saw this [~axel3rd]. Remediation updated to 2min.