@Test public void shouldGetJsonRepresentationForPluggableSCMMaterial() { ConfigurationProperty k1 = create("k1", false, "v1"); SCM scmConfig = SCMMother.create("scm-id", "scm-name", "pluginid", "version", new Configuration(k1)); PluggableSCMMaterial material = new PluggableSCMMaterial(); material.setSCMConfig(scmConfig); material.setFolder("folder"); Map<String, String> jsonMap = new LinkedHashMap<>(); material.toJson(jsonMap, new PluggableSCMMaterialRevision("rev123", new Date())); assertThat(jsonMap.get("scmType"), is("SCM")); assertThat(jsonMap.get("materialName"), is("scm-name")); assertThat(jsonMap.get("location"), is(material.getUriForDisplay())); assertThat(jsonMap.get("folder"), is("folder")); assertThat(jsonMap.get("action"), is("Modified")); }