@Test(expected = AssertionError.class)
public void testGetPathToRootCycleDetection() {

  MemoryObjectTreeNode<TestMemoryObject> node1 = new MemoryObjectTreeNode<>(new TestMemoryObject());
  MemoryObjectTreeNode<TestMemoryObject> node2 = new MemoryObjectTreeNode<>(new TestMemoryObject());
  MemoryObjectTreeNode<TestMemoryObject> node3 = new MemoryObjectTreeNode<>(new TestMemoryObject());
  node1.myParent = node2;
  node2.myParent = node3;
  node3.myParent = node1;
  node1.getPathToRoot();
}