diff --git a/src/main/java/org/mockito/internal/creation/bytebuddy/SubclassByteBuddyMockMaker.java b/src/main/java/org/mockito/internal/creation/bytebuddy/SubclassByteBuddyMockMaker.java index da8de10de9..87188cf5cb 100644 --- a/src/main/java/org/mockito/internal/creation/bytebuddy/SubclassByteBuddyMockMaker.java +++ b/src/main/java/org/mockito/internal/creation/bytebuddy/SubclassByteBuddyMockMaker.java @@ -114,7 +114,8 @@ private RuntimeException prettifyFailure( join( "Mockito cannot mock this class: " + mockFeatures.getTypeToMock() + ".", "", - "Mockito can only mock non-private & non-final classes.", + "Mockito can only mock non-private & non-final classes, but the root cause of this error might be different.", + "Please check the full stacktrace to understand what the issue is.", "If you're not sure why you're getting this error, please report to the mailing list.", "", Platform.warnForVM(