diff --git a/src/test/java/org/apache/commons/lang3/exception/ContextedRuntimeExceptionTest.java b/src/test/java/org/apache/commons/lang3/exception/ContextedRuntimeExceptionTest.java index 7eca04205..aecb7979d 100644 --- a/src/test/java/org/apache/commons/lang3/exception/ContextedRuntimeExceptionTest.java +++ b/src/test/java/org/apache/commons/lang3/exception/ContextedRuntimeExceptionTest.java @@ -79,6 +79,7 @@ public class ContextedRuntimeExceptionTest extends AbstractExceptionContextTest< @Test public void testContextedExceptionStringThrowableContext() { + // Use an anonymous subclass to make sure users can provide custom implementations exceptionContext = new ContextedRuntimeException(TEST_MESSAGE_2, new Exception(TEST_MESSAGE), new DefaultExceptionContext() {}); final String message = exceptionContext.getMessage(); final String trace = ExceptionUtils.getStackTrace(exceptionContext);