@Test
public void mapFromAttributeReturnsExpectedNode() throws NamingException {

    // given
    var expectedId = "ID";
    var expectedName = "full name";
    var expectedGivenName = "given name";
    var expectedMail = "mail@test.com";
    var expectedManagerDn = "manager DN";
    var expectedSurname = "surname";
    var expectedDepartment = "department";
    var expectedDivision = "division";
    var expectedDn = "user DN";
    var expectedDirectReports = List.of("D1", "D2");
    var idAttr = createAttribute(ID_ATTR_ID, expectedId);
    var nameAttr = createAttribute("name", expectedName);
    var givenNameAttr = createAttribute("givenName", expectedGivenName);
    var mailAttr = createAttribute("mail", expectedMail);
    var managerAttr = createAttribute("manager", expectedManagerDn);
    var surnameAttr = createAttribute("sn", expectedSurname);
    var departmentAttr = createAttribute("department", expectedDepartment);
    var divisionAttr = createAttribute("division", expectedDivision);
    var dnAttr = createAttribute("distinguishedName", expectedDn);
    var directReportsAttr = createAttribute("directReports", "D1", "D2");
    var attributes = new BasicAttributes();
    for(var attr : List.of(idAttr, nameAttr, givenNameAttr, mailAttr, managerAttr,
            surnameAttr, departmentAttr, divisionAttr, dnAttr, directReportsAttr)) {
        attributes.put(attr);
    }
    var expectedNode = new LdapUserNode(expectedId, expectedName, expectedGivenName, expectedSurname,
            expectedMail, expectedDivision, expectedDepartment, expectedDn,
            expectedManagerDn, expectedDirectReports);
    // when
    var actualNode = mapper.mapFromAttributes(attributes);
    // then
    assertThat(actualNode).isEqualTo(expectedNode);
}