@Test public void isRootReturnsFalseWhenOtherNodeIsManager() { var managerNode = new HierarchyTreeNode(otherUserMock); var node = new HierarchyTreeNode(userMock); node.manager = managerNode; assertThat(node.isRoot()).isFalse(); }
public boolean isRoot() { return Objects.isNull(manager); }
HierarchyTreeNode implements Iterable<HierarchyTreeNode>, Streamable<HierarchyTreeNode>, Serializable { public boolean isRoot() { return Objects.isNull(manager); } }
HierarchyTreeNode implements Iterable<HierarchyTreeNode>, Streamable<HierarchyTreeNode>, Serializable { public boolean isRoot() { return Objects.isNull(manager); } HierarchyTreeNode(User user); }
HierarchyTreeNode implements Iterable<HierarchyTreeNode>, Streamable<HierarchyTreeNode>, Serializable { public boolean isRoot() { return Objects.isNull(manager); } HierarchyTreeNode(User user); boolean isLeaf(); boolean isRoot(); HierarchyTreeNode getRoot(); void addDirectStaffMember(HierarchyTreeNode staffNode); void removeDirectStaffMember(HierarchyTreeNode staffNode); @Override Iterator<HierarchyTreeNode> iterator(); @Override boolean equals(Object obj); @Override int hashCode(); }
HierarchyTreeNode implements Iterable<HierarchyTreeNode>, Streamable<HierarchyTreeNode>, Serializable { public boolean isRoot() { return Objects.isNull(manager); } HierarchyTreeNode(User user); boolean isLeaf(); boolean isRoot(); HierarchyTreeNode getRoot(); void addDirectStaffMember(HierarchyTreeNode staffNode); void removeDirectStaffMember(HierarchyTreeNode staffNode); @Override Iterator<HierarchyTreeNode> iterator(); @Override boolean equals(Object obj); @Override int hashCode();  }