code: public Map<String, List<Object>> collectAttributesFromEntity(final JsonObject couchbaseEntity, final Predicate<String> filter) {
          return couchbaseEntity.getNames()
              .stream()
              .filter(filter)
              .map(name -> Pair.of(name, couchbaseEntity.get(name)))
              .collect(Collectors.toMap(Pair::getKey, s -> CollectionUtils.wrapList(s.getValue())));
      }
docs: Collect attributes from entity map.
  
  @param couchbaseEntity the couchbase entity
  @param filter          the filter
  @return the map