@Test
    public void deserialize_serialize_roundtrip() throws IOException {
        YamasJsonModel jsonModel = getYamasJsonModel("yamas-array.json");

        // Do some sanity checking
        assertEquals("vespa.searchnode", jsonModel.application);
        assertTrue(jsonModel.routing.get("yamas").namespaces.contains("Vespa"));
        assertEquals(5.555555555E9, jsonModel.metrics.get("memory_rss"), 0.1d); //Not using custom double renderer

        // Serialize and verify
        try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
            YamasResponse response = new YamasResponse(200, List.of(YamasJsonUtil.toMetricsPacketBuilder(jsonModel).build()), false);
            response.render(outputStream);
            assertEquals(EXPECTED_JSON, outputStream.toString());
        }
    }
Tests for YamasJsonModel and YamasArrayJsonModel

@author smorgrav
@author gjoranv
metrics-proxy/src/test/java/ai/vespa/metricsproxy/metric/model/json/YamasJsonModelTest.java