AbstractComponent ac = Mockito.mock(AbstractComponent.class);
AbstractComponent parent = Mockito.mock(AbstractComponent.class);
JTree tree = Mockito.mock(JTree.class);
TreePath treePath = Mockito.mock(TreePath.class);
ActionContextImpl actionContext = Mockito.mock(ActionContextImpl.class);
NodeViewManifestation selectedNodeView = Mockito.mock(NodeViewManifestation.class);
NodeViewManifestation parentNodeView = Mockito.mock(NodeViewManifestation.class);
Mockito.when(actionContext.getTargetHousing()).thenReturn(housing);
Mockito.when(actionContext.getTargetComponent()).thenReturn(ac);
Mockito.when(housing.getDirectoryArea()).thenReturn(directoryArea);
Mockito.when(directoryArea.getSelectedManifestations()).thenReturn(Collections.<View>singleton(selectedNodeView));
Mockito.when(directoryArea.getSelectedDirectoryNode()).thenReturn(selectedNode);
Mockito.when(selectedNode.getParentTree()).thenReturn(tree);
Mockito.when(tree.getSelectionPaths()).thenReturn(Arrays.array(treePath));