class DefaultSlingSimulator implements SlingSimulatorBackend, SlingSimulator {

    @NotNull Result<Optional<SlingInstallableParams<?>>>
    readInstallableParamsFromNode(final @NotNull Node node) {
        return result0(() -> {
            final String path = node.getPath();
            NodeRes nodeRes = new NodeRes(node, path);
            if (Arrays.asList(node.getSession().getWorkspace().getNamespaceRegistry().getURIs()).contains(SLING_NS)
                    && node.isNodeType(SLING_OSGI_CONFIG)) {
                // handle sling:OsgiConfig
                loadJcrProperties(nodeRes.getProps(), node);

                return maybeConfigResource(nodeRes);
            } else if (node.hasProperty(JCR_CONTENT_DATA)) {
                // this could be a properties file, or a package file (.zip), or a bundle (.jar)
                // check extension here
                nodeRes.getProps().put(InstallableResource.INSTALLATION_HINT, node.getParent().getName());

                EmbeddedPackageInstallableParams packageInstallableParams = maybePackageResource(nodeRes);
                if (packageInstallableParams != null) {
                    return packageInstallableParams;
                }

                if (isConfigExtension(path)) {
                    try (InputStream is = node.getProperty(JCR_CONTENT_DATA).getBinary().getStream()) {
                        nodeRes.getProps().putAll(readDictionary(is, nodeRes.getPath()));
                    } catch (Exception e) {
                        nodeRes.setParseError(e);
                    }

                    return maybeConfigResource(nodeRes);
                }
            }
            return null;
        }).get().map(Optional::ofNullable);
    }

}