@Test(expected = IOException.class)
public void testReadDictionary_dotCfgJson_throwsError() throws Exception {

    final String dotCfgJson = obj()
            .key("foo:Integer", "not an int")
            .get().toString();
    try {
        DefaultSlingSimulator.readDictionary(
                new ByteArrayInputStream(dotCfgJson.getBytes(StandardCharsets.UTF_8)), "simple.cfg.json");
    } catch (ConversionException ce) {
        // this is for org.osgi.util.converter 1.0.1 on java 12+,
        throw new IOException(ce);
    }
}