@Test
public void testWebSocketMessage_instance() throws Exception {

	ObjectMapper mapper = JSonBindingUtils.createObjectMapper();
	WebSocketMessage wsm = new WebSocketMessage( null, null, null );
	StringWriter writer = new StringWriter();
	mapper.writeValue( writer, wsm );
	Assert.assertEquals( "{}", writer.toString());
	TestApplication app = new TestApplication();
	wsm = new WebSocketMessage( app.getMySql(), app, EventType.CREATED );
	writer = new StringWriter();
	mapper.writeValue( writer, wsm );
	String s = writer.toString();
	Assert.assertEquals( "{\"event\":\"CREATED\",\"app\":{\"name\":\"test\",\"displayName\":\"test\",\"tplName\":\"test-app\",\"tplVersion\":\"1.0.1\"},\"inst\":"
			+ "{\"name\":\"mysql-server\",\"path\":\"/mysql-vm/mysql-server\",\"status\":\"NOT_DEPLOYED\","
			+ "\"component\":{\"name\":\"mysql\",\"installer\":\"puppet\"},\"exports\":{\"mysql.port\":\"3306\",\"mysql.ip\":null}}}", s );
}