MessageProperties { static void setStringProperty(Message message, String name, String value) { try { message.setStringProperty(name, value); } catch (Throwable t) { propagateIfFatal(t); log(t, "error setting property {0} on message {1}", name, message); } }    }
@Test public void setStringProperty() throws Exception { MessageProperties.setStringProperty(message, "b3", "1"); assertThat(message.getObjectProperty("b3")) .isEqualTo("1"); }
@Test public void setStringProperty_replace() throws Exception { message.setByteProperty("b3", (byte) 0); MessageProperties.setStringProperty(message, "b3", "1"); assertThat(message.getObjectProperty("b3")) .isEqualTo("1"); }