MemoryObjectTreeNode implements MutableTreeNode { @NotNull public T getAdapter() { return myAdapter; } MemoryObjectTreeNode(@NotNull T adapter); @Override TreeNode getChildAt(int i); @Override int getChildCount(); @Override TreeNode getParent(); @Override int getIndex(TreeNode treeNode); @Override boolean isLeaf(); @Override Enumeration children(); @NotNull ImmutableList<MemoryObjectTreeNode<T>> getChildren(); @Override boolean getAllowsChildren(); void add(@NotNull MemoryObjectTreeNode child); @Override void insert(MutableTreeNode newChild, int childIndex); @Override void setParent(@Nullable MutableTreeNode newParent); @Override void remove(int childIndex); @Override void remove(MutableTreeNode node); @Override void removeFromParent(); void removeAll(); @Override void setUserObject(Object object); @NotNull T getAdapter(); void sort(@NotNull Comparator<MemoryObjectTreeNode<T>> comparator); @Nullable Comparator<MemoryObjectTreeNode<T>> getComparator(); @NotNull List<MemoryObjectTreeNode<T>> getPathToRoot(); void select();  }
@Test public void testGetAdapter() { TestMemoryObject adapter = new TestMemoryObject(); MemoryObjectTreeNode<TestMemoryObject> node = new MemoryObjectTreeNode<>(adapter); assertEquals(adapter, node.getAdapter()); }