From 342ac343108711d1f809981e935dfa82d61ce8a0 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 7 Sep 2018 17:37:46 +0200 Subject: [PATCH] Test status quo for void method references passed to assertThrows() Issue: #1576 --- .../org/junit/jupiter/api/AssertThrowsAssertionsTests.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsAssertionsTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsAssertionsTests.java index 97bd43e22407..6cd83c0ab9da 100644 --- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsAssertionsTests.java +++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/api/AssertThrowsAssertionsTests.java @@ -79,6 +79,9 @@ void assertThrowsWithMethodReferenceForVoidReturnType() { // Explicitly as an Executable exception = assertThrows(IllegalMonitorStateException.class, (Executable) object::notify); assertNotNull(exception); + + exception = assertThrows(IllegalMonitorStateException.class, (Executable) object::wait); + assertNotNull(exception); } // --- executable ----------------------------------------------------------