Inspectopedia Help

Expected exception never thrown in test method body

Reports checked exceptions expected by a JUnit 4 test-method that are never thrown inside the method body. Such test methods will never succeed.


@Test(expected = CloneNotSupportedException.class) public void testIt() { }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023