'org.jmock.imposters does not exist junit5

I migrated from version Junit 4 to 5.

enter image description here

Getting error on compiling the code on

import org.jmock.imposters.ByteBuddyClassImposteriser;

@ExtendWith(JUnit5Mockery.class)
public class Test {
private Mockery context =  new JUnit5Mockery() {
    {
        Synchroniser threadSynchoniser = new Synchroniser();
        setThreadingPolicy(threadSynchoniser);
        setImposteriser(ByteBuddyClassImposteriser.INSTANCE);
    }
};

error: package org.jmock.imposters does not exist import org.jmock.imposters.ByteBuddyClassImposteriser;

this is my build.gradle

testImplementation (group: 'org.dbunit', name: 'dbunit', version: '2.4.5'){
     exclude group: 'junit', module: 'junit'
}

testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.7.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.2'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.2'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.2'
testImplementation (group: 'org.jmock', name: 'jmock-junit5', version: '2.12.0') {
    exclude group: 'net.bytebuddy', module: 'byte-buddy'
    exclude group: 'org.junit.jupiter', module: 'junit-jupiter-api'
    exclude group: 'org.junit.platform', module: 'junit-platform-launcher'
    exclude group: 'org.objenesis', module: 'objenesis'
}
testImplementation (group: 'junit', name: 'junit', version: '4.13.1')
{
    exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
testImplementation "org.springframework:spring-test:5.2.19.RELEASE"

// for h2 goodness
testImplementation group: 'com.h2database', name: 'h2', version: '1.4.188'
implementation (group: 'com.sun.xml.messaging.saaj', name: 'saaj-impl', version: '1.5.1'){
     exclude group: 'jakarta.xml.bind', module: 'jakarta.xml.bind-api'
     exclude group: 'org.jvnet.staxex', module: 'stax-ex'
     exclude group: 'org.jvnet.mimepull', module: 'mimepull'
}    

What am I doing wrong here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source