@Test
public void testReadDictionary_dotCfgJson() throws Exception {

    final Map<String, Object> expectConfig = new HashMap<>();
    expectConfig.put("foo", "bar");
    expectConfig.put("foos", Stream.of("bar", "bar", "bar").toArray(String[]::new));
    expectConfig.put("ones", Stream.of(1L, 1L, 1L).toArray(Long[]::new));
    expectConfig.put("nothing", new String[0]);
    final String dotCfgJson = obj()
            .key("foo", "bar")
            .key("foos", arr().val("bar").val("bar").val("bar"))
            .key("ones", arr().val(1L).val(1L).val(1L))
            .key("nothing", arr())
            .get().toString();
    checkExpectedProperties(expectConfig, DefaultSlingSimulator.readDictionary(
            new ByteArrayInputStream(dotCfgJson.getBytes(StandardCharsets.UTF_8)), "simple.cfg.json"));
    checkExpectedProperties(expectConfig, DefaultSlingSimulator.readDictionary(
            new ByteArrayInputStream(dotCfgJson.getBytes(StandardCharsets.UTF_8)), "nested/simple.cfg.json"));
    checkExpectedProperties(expectConfig, DefaultSlingSimulator.readDictionary(
            new ByteArrayInputStream(dotCfgJson.getBytes(StandardCharsets.UTF_8)), "nested/simple-inst.cfg.json"));
}