@Test
public void testGetInfoByChangeRef() throws Exception {

  SessionContext context = TestUtils.createSessionContext(USER, "test");
  Id itemId = new Id();
  Id versionId = new Id();
  Id elementId = new Id();
  Id revisionId = new Id("changeRef");
  ElementContext elementContext = new ElementContext(itemId, versionId, revisionId);
  Namespace namespace = Namespace.ROOT_NAMESPACE;
  doReturn(new Response<>(namespace))
      .when(stateAdaptorMock).getNamespace(context, itemId, elementId);
  CoreElement sub1 = new CoreElement();
  sub1.setId(new Id());
  CoreElement sub2 = new CoreElement();
  sub2.setId(new Id());
  CoreElement retrievedCoreElement = createCoreElement(elementId, Action.IGNORE, null, namespace,
      "infoValue", Arrays.asList(new Relation(), new Relation()), sub1, sub2);
  Response<CoreElement> CoreElementRes = new Response<>(retrievedCoreElement);
  doReturn(CoreElementRes).when(collaborationAdaptorMock)
      .getElement(context, elementContext, namespace, elementId);
  CoreElementInfo elementInfo = elementManager.getInfo(context, elementContext, elementId);
  assertEquals(retrievedCoreElement, elementInfo);
}