Expand my Community achievements bar.

Constructor must call super() or this() Junit

Avatar

Level 5

Hi,

I am trying to execute simple test case, but getting an error. Below is my test case :

@Rule
public AemContext context = new AemContext();

@Test
public void test() throws Exception {

   Resource currentResource = context.create().resource("/content/app/en-us/page",

   "jcr:title", "Title Page", "width", "5","height","9");

   inheritanceValueMap = Mockito.spy(new HierarchyNodeInheritanceValueMap(currentResource));

  Assert.assertThat(inheritanceValueMap.getInherited("width", StringUtils.EMPTY), Is.is("5"));

}

Error I am getting is :

java.lang.VerifyError: (class: com/day/cq/commons/ValueMapWrapper, method: <init> signature: (Lorg/apache/sling/api/resource/ValueMap;)V) Constructor must call super() or this()

Any solution to this?

Thanks,

2 Replies