Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

anyone successfully used com.adobe.cq.wcm.core.components.testing.mock.ContextPlugins.CORE_COMPONENTS;


Level 7

Has anyone successfully used 

import static com.adobe.cq.wcm.core.components.testing.mock.ContextPlugins.CORE_COMPONENTS;


I have copied all dependencies from https://github.com/wcm-io/io.wcm.maven.aem-dependencies/blob/develop/6.5.13/pom.xml

Above did not work.


I tried having below dependency in pom, core/pom files but somehow could not resolve this dependency at my client machine.



Still could not get above import working in my junit.





3 Replies


Employee Advisor



To use the import statement import static com.adobe.cq.wcm.core.components.testing.mock.ContextPlugins.CORE_COMPONENTS; successfully, follow these steps:

  1. Add AEM Mocks Dependency: Include the AEM Mocks library as a test dependency in your project's pom.xml file:



  1. Configure AEM Mocks Context: Set up the AEM Mocks context in your test class using the AemContext rule:

import io.wcm.testing.mock.aem.junit.AemContext;

public class MyTest {
public final AemContext context = new AemContext();

// Your test methods here


Community Advisor

@sreenu539 solution provided by @ManviSharma should work.. please try and let us know if you still need our help.


Level 7

I am specifically looking to cover "super typed core teaser" as part of junit.