Configuration extends AbstractNamed implements Child<Profile>,
		Typed { @Override public void setParent(Profile parent) { if (this.parent != null && this.parent != parent) this.parent.getConfigurations().remove(this); this.parent = parent; if (parent != null) parent.getConfigurations().add(this); } Configuration();  Configuration(String name); @Override boolean accept(Visitor visitor); Configurable getConfigures(); @Override Profile getParent(); JsonNode getJson(); String getJsonAsString(); ObjectNode getJsonAsObjectNode(); @Override URI getType(); void setConfigures(Configurable configurable); @Override void setParent(Profile parent); void setJson(JsonNode json); @Override void setType(URI type); JsonNode getJsonSchema(); void setJsonSchema(JsonNode jsonSchema); void setJsonSchema(String jsonString); void setJson(String jsonString);  }
@Test public void configurationNotAddedTwice() throws Exception { Configuration c1a = new Configuration("c1"); Profile p1 = new Profile("p1"); p1.getConfigurations().add(c1a); c1a.setParent(p1); p1.getConfigurations().add(c1a); Configuration c1b = new Configuration("c1"); Profile p2 = new Profile("p2"); p2.getConfigurations().add(c1b); c1b.setParent(p2); p2.getConfigurations().add(c1b); WorkflowBundle bundle = new WorkflowBundle(); p1.setParent(bundle); p2.setParent(bundle); new Scufl2Tools().setParents(bundle); assertEquals(1, p1.getConfigurations().size()); assertEquals(1, p2.getConfigurations().size()); }