I am using AEM Mocks (with JUnit 5). I create my context as follows:
private final AemContext aemContext = new AemContext(ResourceResolverType.JCR_OAK);<
private final AemContext aemContext = new AemContext(ResourceResolverType.JCR_OAK);