VersionsJsonConverter { JsonObject getConvertedJson() { return convertedObject; } VersionsJsonConverter(JsonObject platformVersions);   }
@Test public void convertPlatformVersions() throws IOException { String json = "{\"core\": {"+ "\"flow\": { " + " \"javaVersion\": \"3.0.0.alpha17\"" + "}, " + " \"vaadin-progress-bar\": { " + " \"npmName\": \"@vaadin/vaadin-progress-bar\", " + "\"jsVersion\": \"1.1.2\" " + "}," + "}," + "\"vaadin-upload\": { " + "\"npmName\": \"@vaadin/vaadin-upload\", " + "\"jsVersion\": \"4.2.2\"" + "},"+ "\"iron-list\": {\n" + " \"npmName\": \"@polymer/iron-list\",\n" + " \"npmVersion\": \"3.0.2\",\n" + " \"javaVersion\": \"3.0.0.beta1\",\n" + " \"jsVersion\": \"2.0.19\"\n" + " }," +"\"platform\": \"foo\"" + "}"; VersionsJsonConverter convert = new VersionsJsonConverter( Json.parse(json)); JsonObject convertedJson = convert.getConvertedJson(); Assert.assertTrue(convertedJson.hasKey("@vaadin/vaadin-progress-bar")); Assert.assertTrue(convertedJson.hasKey("@vaadin/vaadin-upload")); Assert.assertTrue(convertedJson.hasKey("@polymer/iron-list")); Assert.assertFalse(convertedJson.hasKey("flow")); Assert.assertFalse(convertedJson.hasKey("core")); Assert.assertFalse(convertedJson.hasKey("platform")); Assert.assertEquals("1.1.2", convertedJson.getString("@vaadin/vaadin-progress-bar")); Assert.assertEquals("4.2.2", convertedJson.getString("@vaadin/vaadin-upload")); Assert.assertEquals("3.0.2", convertedJson.getString("@polymer/iron-list")); }