Skip to content

Migrate tests from jMock to Mockito and fix Java 17 test compatiblity in clover-maven-plugin #224

@marek-parfianowicz

Description

@marek-parfianowicz

Currently tests of clover-maven-plugin are failing because of an old jMock version used:

Error:  com.atlassian.maven.plugin.clover.CloverSnapshotMojoTest.testExecuteCloverSnapshotWhenSnapshotDirDoesNotExist -- Time elapsed: 0.004 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class org.jmock.lib.legacy.ClassImposteriser$3
	at org.jmock.lib.legacy.ClassImposteriser.proxyClass(ClassImposteriser.java:97)
	at org.jmock.lib.legacy.ClassImposteriser.imposterise(ClassImposteriser.java:66)
	at org.jmock.Mockery.mock(Mockery.java:148)
	at org.jmock.Mockery.mock(Mockery.java:124)
	at org.jmock.integration.junit3.MockObjectTestCase.mock(MockObjectTestCase.java:118)
	at com.atlassian.maven.plugin.clover.CloverSnapshotMojoTest.testExecuteCloverSnapshotWhenSnapshotDirDoesNotExist(CloverSnapshotMojoTest.java:33)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at junit.framework.TestCase.runTest(TestCase.java:177)

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions