TopDownNode extends CpuTreeNode<TopDownNode> { @NotNull @Override public CaptureNodeModel getMethodModel() { CaptureNodeModel model = getNodes().get(0).getData(); assert model != null; return model; } TopDownNode(@NotNull CaptureNode node); @NotNull @Override CaptureNodeModel getMethodModel(); @Override CaptureNode.FilterType getFilterType();  }
@Test public void testTreeData() { CaptureNodeModel rootModel = new JavaMethodModel("A", "com.package.Class"); TopDownNode topDown = new TopDownNode(newNode(rootModel, 0, 10)); CaptureNodeModel model = topDown.getMethodModel(); assertEquals(rootModel, topDown.getMethodModel()); assertEquals("com.package.Class.A", rootModel.getFullName()); assertTrue(model instanceof JavaMethodModel); assertEquals("com.package.Class", ((JavaMethodModel) model).getClassName()); assertEquals("A", model.getName()); }