static void assertConfigEquals(String expectedJson, ConfigInstance config) {
        Slime slime = new Slime();
        ConfigInstance.serialize(config, new ConfigInstanceSerializer(slime));
        JsonFormat jsonFormat = new JsonFormat(true);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();

        try {
            jsonFormat.encode(baos, slime);
        } catch (IOException e) {
            fail();
        }

        assertJsonEquals(baos.toString(), expectedJson);
    }
@author Ulf Lilleengen
@author Vegard Sjonfjell
config/src/test/java/com/yahoo/config/subscription/ConfigInstanceSerializerTest.java