    @Test
    public void testEmptyContainer() throws Exception {

        ResourcePreparer<ScimResource> preparer = new ResourcePreparer<>(resourceTypeDefinition, "default", null, testBaseUri);

        ObjectNode node = (ObjectNode) JsonUtils.getObjectReader()
                                                .readTree("{\n" + "  \"default\": {\n" + "    \"never\": \"here\"\n" + "  }\n" + "}");

        GenericScimResource prepared = preparer.trimRetrievedResource(new GenericScimResource(node));
        assertFalse(prepared.getObjectNode().has("default"));

        node = (ObjectNode) JsonUtils.getObjectReader()
                                     .readTree("{\n"
                                               + "  \"default\": [\n"
                                               + "    {\n"
                                               + "      \"never\": \"here\"\n"
                                               + "    },\n"
                                               + "    {\n"
                                               + "      \"always\": \"here\"\n"
                                               + "    }\n"
                                               + "  ]\n"
                                               + "}");

        prepared = preparer.trimRetrievedResource(new GenericScimResource(node));
        assertTrue(prepared.getObjectNode().has("default"));
        assertEquals(1, prepared.getObjectNode().get("default").size());


        node = (ObjectNode) JsonUtils.getObjectReader()
                                     .readTree("{\n"
                                               + "  \"default\": [\n"
                                               + "    {\n"
                                               + "      \"never\": \"here\"\n"
                                               + "    },\n"
                                               + "    {\n"
                                               + "      \"never\": \"here\"\n"
                                               + "    }\n"
                                               + "  ]\n"
                                               + "}");

        prepared = preparer.trimRetrievedResource(new GenericScimResource(node));
        assertFalse(prepared.getObjectNode().has("default"));

        node = (ObjectNode) JsonUtils.getObjectReader().readTree("{\n" + "  \"urn:ext:1\": {\n" + "    \"never\": \"here\"\n" + "  }\n" + "}");

        prepared = preparer.trimRetrievedResource(new GenericScimResource(node));
        assertFalse(prepared.getObjectNode().has("urn:ext:1"));
    }