@Test
public void getManagerOfUserThrowsExceptionWhenHierarchyNotPresent() {

    // given
    var expectedMessage = String.format("Hierarchy for User with ID '%s' not found!", USER_ID);
    given(hierarchyTreeNodeRepoMock.findByUser(userMock)).willReturn(Optional.empty());
    // when / then
    assertThatThrownBy(() -> repoUserService.getManagerOfUser(userMock))
            .isInstanceOf(HierarchyNotFoundException.class)
            .hasMessage(expectedMessage);
}