@Test
public void testMaybeConfigResource_factoryTilde() throws Exception {

    String configPath = "/apps/install/com.Test~pid";
    OakpalPlan.fromJson(obj().get())
            .toOakMachineBuilder(null, getClass().getClassLoader())
            .build().adminInitAndInspect(session -> {
        DefaultSlingSimulator.NodeRes nodeRes = new DefaultSlingSimulator.NodeRes(
                JcrUtils.getOrCreateByPath(configPath, "nt:unstructured", session), configPath);
        OsgiConfigInstallableParams params = DefaultSlingSimulator.maybeConfigResource(nodeRes);
        assertNotNull("expect nonnull config params", params);
        assertEquals("expect servicePid", "pid", params.getServicePid());
        assertEquals("expect factoryPid", "com.Test", params.getFactoryPid());
    });
}