public Map<String, DocumentPermission> getPermissions() {
        return permissions.entrySet()
                .stream()
                .collect(Collectors.toMap(
                        Entry::getKey,
                        entry ->
                                DocumentPermission.PRIMITIVE_VALUE_CONVERTER.fromPrimitiveValue(entry.getValue())));
    }
Mostly for use in tests

@return A map of docUUID => {@link DocumentPermission}.
stroom-security/stroom-security-impl/src/main/java/stroom/security/impl/UserDocumentPermissions.java