BAEL-3504: Update core-java-modules/core-java-reflection/src/test/java/com/baeldung/reflection/exception/invocationtarget/InvocationTargetUnitTest.java

Co-Authored-By: KevinGilmore <kpg102@gmail.com>
This commit is contained in:
Vikas Rajput 2020-01-19 10:52:37 +03:00 committed by GitHub
parent 82cffb4b61
commit 9e2e9bd460
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test;
public class InvocationTargetUnitTest {
@Test
public void whenCallingMethodThrowsException_thenAssertTrue() throws Exception {
public void whenCallingMethodThrowsException_thenAssertCauseOfInvocationTargetException() throws Exception {
InvocationTargetExample targetExample = new InvocationTargetExample();
Method method = InvocationTargetExample.class.getMethod("divideByZeroExample");
Exception exception = assertThrows(InvocationTargetException.class, () -> method.invoke(targetExample));