@Override
    public Object decorate(RequestedField field, Object value, SearchUser searchUser) {

        final List<String> ids = parseIDs(value);
        final EntityTitleRequest req = ids.stream()
                .map(id -> new EntityIdentifier(id, FIELD_ENTITY_MAPPER.get(field.name())))
                .collect(Collectors.collectingAndThen(Collectors.toList(), EntityTitleRequest::new));

        final EntitiesTitleResponse response = entityTitleService.getTitles(req, searchUser);
        return extractTitles(ids, response.entities()).stream()
                .collect(Collectors.collectingAndThen(Collectors.toList(), titles -> value instanceof Collection<?> ? titles : unwrapIfSingleResult(titles)));
    }
@Test
    void testDecorateNotPermitted() {
        final EntitiesTitleResponse response = new EntitiesTitleResponse(Collections.emptySet(), Collections.singleton("123"));
        final FieldDecorator decorator = new TitleDecorator((request, permissions) -> response);
        Assertions.assertThat(decorator.decorate(RequestedField.parse("streams"), "123", TestSearchUser.builder().build()))
                .isEqualTo("123");
    }