@Test
public void testInstanceBinding_7() throws Exception {

	final String result = "{\"name\":\"instance\",\"path\":\"/instance\",\"status\":\"NOT_DEPLOYED\",\"component\":{\"name\":\"component1\"},\"exports\":{\"component1.ip\":\"127.0.0.1\",\"any field\":\"some value\",\"component1.test\":\"test\"}}";
	ObjectMapper mapper = JSonBindingUtils.createObjectMapper();
	Component comp = new Component("component1");
	comp.addExportedVariable( new ExportedVariable( "test", "test" ));
	Instance inst = new Instance( "instance" ).component(comp);
	inst.overriddenExports.put("component1.ip", "127.0.0.1");
	inst.overriddenExports.put("any field", "some value");
	StringWriter writer = new StringWriter();
	mapper.writeValue( writer, inst );
	String s = writer.toString();
	// May this fail due to export fields ordering ? Works by now...
	// Just remove line below if it happens to fail.
	Assert.assertEquals( result, s );
	Instance readInst = mapper.readValue( result, Instance.class);
	Map<String, String> exports = InstanceHelpers.findAllExportedVariables(inst);
	Map<String, String> readExports = InstanceHelpers.findAllExportedVariables(readInst);
	Assert.assertEquals(exports, readExports); // Works on maps with non-mutable keys (here, String is fine)
	Assert.assertEquals( "/instance", readInst.data.get( AT_INSTANCE_PATH ));
}