@Test
public void addDirectStaffMemberAddsNodeToItselfAndAllParents() {

    // given
    var rootNode = new HierarchyTreeNode(userMock);
    rootNode.managingUser = true;
    var managerNode = new HierarchyTreeNode(otherUserMock);
    managerNode.manager = rootNode;
    rootNode.staff.add(managerNode);
    rootNode.directStaff.add(managerNode);
    var nodeToAdd = new HierarchyTreeNode(userMock);
    // when
    managerNode.addDirectStaffMember(nodeToAdd);
    // then
    var softly = new SoftAssertions();
    softly.assertThat(rootNode.staff).containsExactlyInAnyOrder(managerNode, nodeToAdd);
    softly.assertThat(rootNode.directStaff).containsExactlyInAnyOrder(managerNode);
    softly.assertThat(rootNode.managingUser).isTrue();
    softly.assertThat(managerNode.manager).isSameAs(rootNode);
    softly.assertThat(managerNode.staff).containsExactlyInAnyOrder(nodeToAdd);
    softly.assertThat(managerNode.directStaff).containsExactlyInAnyOrder(nodeToAdd);
    softly.assertThat(managerNode.managingUser).isTrue();
    softly.assertThat(nodeToAdd.manager).isSameAs(managerNode);
    softly.assertThat(nodeToAdd.staff).isEmpty();
    softly.assertThat(nodeToAdd.directStaff).isEmpty();
    softly.assertThat(nodeToAdd.managingUser).isFalse();
    softly.assertAll();
}