@Test
public void uneededNodesGetRecycled() {

  when(sourceMock.getParent()).thenReturn(parentMock);
  when(parentMock.getParent()).thenReturn(grandparentMock);
  AccessibilityNodeInfo rootNode = testSubject.getRootNodeFromSource(sourceMock);
  verify(sourceMock, never()).recycle();
  verify(rootNode, never()).recycle();
  verify(parentMock, times(1)).recycle();
}