@Test
public void testReadInstallableResourceFromNode_slingOsgiConfig() throws Exception {

    OakpalPlan.fromJson(key(keys().repoInits(), arr()
            .val("register nodetypes")
            .val("<<===")
            .val("<'sling'='http://sling.apache.org/jcr/sling/1.0'>")
            .val("[sling:OsgiConfig] > nt:unstructured, nt:hierarchyNode")
            .val("===>>")
            .val("create path (nt:folder) /apps/config/Test(sling:OsgiConfig)"))
            .get()).toOakMachineBuilder(null, getClass().getClassLoader())
            .build().initAndInspect(session -> {
        SlingInstallableParams<?> resource = slingSimulator
                .readInstallableParamsFromNode(session.getNode("/apps/config/Test")).toOptional()
                .flatMap(Function.identity())
                .orElse(null);
        assertNotNull("expect not null resource", resource);
        assertTrue("expect instance of OsgiConfigInstallableParams",
                resource instanceof OsgiConfigInstallableParams);
        OsgiConfigInstallableParams params = (OsgiConfigInstallableParams) resource;
        assertNotNull("expect not null properties", params.getProperties());
        assertEquals("expect servicePid is Test", "Test", params.getServicePid());
        PackageId base = new PackageId("com.test", "base", "1.0.0");
        OsgiConfigInstallable installable = params.createInstallable(base, "/apps/config/Test");
    });
}