@Test public void testMessageWithCreate() { String displayId = DisplayUtil.getId(shell.getDisplay()); String[] styles = new String[] {"TRIM", "FOO"}; writer.appendCreate(shellId, "org.Text"); writer.appendSet(shellId, "parent", displayId); writer.appendSet(shellId, "style", JsonUtil.createJsonArray(styles)); writer.appendSet(shellId, "key1", "a"); writer.appendSet(shellId, "key2", "b"); CreateOperation operation = (CreateOperation) getMessage().getOperation(0); assertEquals(shellId, operation.getTarget()); assertEquals(displayId, operation.getParent()); assertEquals("org.Text", operation.getType()); assertArrayEquals(styles, operation.getStyles()); assertEquals("a", operation.getProperty("key1").asString()); assertEquals("b", operation.getProperty("key2").asString()); }