@Test
public void testWebSocketMessage_applicationTemplate() throws Exception {

	ObjectMapper mapper = JSonBindingUtils.createObjectMapper();
	WebSocketMessage wsm = new WebSocketMessage((ApplicationTemplate) null, null );
	StringWriter writer = new StringWriter();
	mapper.writeValue( writer, wsm );
	Assert.assertEquals( "{}", writer.toString());
	TestApplicationTemplate tpl = new TestApplicationTemplate();
	wsm = new WebSocketMessage( tpl, EventType.CHANGED );
	writer = new StringWriter();
	mapper.writeValue( writer, wsm );
	String s = writer.toString();
	Assert.assertEquals( "{\"event\":\"CHANGED\",\"tpl\":{\"name\":\"test-app\",\"displayName\":\"test-app\",\"version\":\"1.0.1\",\"apps\":[]}}", s );
}