Skip to content

Commit

Permalink
test: remove useless import.
Browse files Browse the repository at this point in the history
  • Loading branch information
psxjoy committed Jan 8, 2025
1 parent 4167ae6 commit 13d3cfe
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.UndeclaredThrowableException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.UndeclaredThrowableException;

/**
*
*/
class ExceptionUtilTest {
private Exception exception;

@Test
public void unwrap() {
InvocationTargetException targetException = new InvocationTargetException(new RuntimeException("invocation"));
Expand All @@ -41,6 +35,7 @@ public void unwrap() {
RuntimeException runtimeException = new RuntimeException("runtime");
Assertions.assertInstanceOf(RuntimeException.class, ExceptionUtil.unwrap(runtimeException));
}

@Test
public void unwrap_InvocationTargetException_ReturnsCause() {
InvocationTargetException ite = new InvocationTargetException(exception, "test");
Expand Down Expand Up @@ -68,4 +63,4 @@ public void unwrap_NotWrappedException_ReturnsSameException() {
Throwable result = ExceptionUtil.unwrap(exception);
Assertions.assertSame(exception, result, "Expected the unwrapped exception to be the same as the input when no wrapping is present.");
}
}
}

0 comments on commit 13d3cfe

Please sign in to comment.