@Test
public void modifyAbstractTreeNode() {

  TreeStructureProvider mockProvider = mock(TreeStructureProvider.class);
  AbstractTreeNode mockParent = mock(AbstractTreeNode.class);
  BuildScriptTreeStructureProvider provider = new BuildScriptTreeStructureProvider(mockProvider);
  List<AbstractTreeNode<?>> children = createChildren();
  List<AbstractTreeNode<?>> modified = createChildren();
  doReturn(modified).when(mockProvider).modify(mockParent, children, null);
  Collection<AbstractTreeNode<?>> result = provider.modify(mockParent, children, null);
  verify(mockProvider).modify(mockParent, children, null);
  assertSameElements(result, modified);
}