diff --git a/src/test/java/junit/tests/framework/AssertTest.java b/src/test/java/junit/tests/framework/AssertTest.java index 42731bb5207e..d971a1ef8426 100644 --- a/src/test/java/junit/tests/framework/AssertTest.java +++ b/src/test/java/junit/tests/framework/AssertTest.java @@ -82,7 +82,7 @@ public void testAssertStringNotEqualsNull() { assertEquals("foo", null); fail(); } catch (ComparisonFailure e) { - String unused = e.getMessage(); // why no assertion? + assertNotNull(e.getMessage()); } } @@ -90,7 +90,7 @@ public void testAssertNullNotEqualsNull() { try { assertEquals(null, new Object()); } catch (AssertionFailedError e) { - String unused = e.getMessage(); // why no assertion? + assertNotNull(e.getMessage()); return; } fail();