@Test
public void usersAreManagers() {

    // given
    var users = Set.of(userMock, otherUserMock);
    var hierarchies = List.of(hierarchyTreeNodeMock, otherHierarchyTreeNodeMock);
    given(hierarchyTreeNodeMock.getUser()).willReturn(userMock);
    given(hierarchyTreeNodeMock.isManagingUser()).willReturn(true);
    given(otherHierarchyTreeNodeMock.getUser()).willReturn(otherUserMock);
    given(otherHierarchyTreeNodeMock.isManagingUser()).willReturn(false);
    given(hierarchyTreeNodeRepoMock.findByUserIn(users)).willReturn(hierarchies);
    // when
    var actualMap = repoUserService.usersAreManagers(users);
    // then
    assertThat(actualMap)
            .containsOnly(MapEntry.entry(userMock, true), MapEntry.entry(otherUserMock, false));
}