Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*
* Copyright 2013-2016 ForgeRock AS.
* Portions Copyright 2017 Rosie Applications, Inc.
* Portions Copyright 2026 3A Systems, LLC
*/
package org.forgerock.opendj.rest2ldap;

Expand Down Expand Up @@ -805,8 +806,12 @@ public void testReadSelectPartial() throws Exception {
assertThat(resource.getId()).isEqualTo("test1");
assertThat(resource.getRevision()).isEqualTo("12345");
assertThat(resource.getContent().get("_id").asString()).isNull();
assertThat(resource.getContent().get("name").asMap()).isNull();
assertThat(resource.getContent().get("surname").asString()).isEqualTo("user 1");
// The nested structure of the requested field is now preserved: the
// projected "/name/surname" is returned as { "name": { "surname": ... } }
// instead of being collapsed to a top-level "surname" field.
assertThat(resource.getContent().get("name").asMap()).isNotNull();
assertThat(resource.getContent().get("name").get("surname").asString()).isEqualTo("user 1");
assertThat(resource.getContent().get("surname").asString()).isNull();
assertThat(resource.getContent().get("_rev").asString()).isNull();
}

Expand Down
Loading