### Question:
AmqpJmsObjectMessageFacade extends AmqpJmsMessageFacade implements JmsObjectMessageFacade { @Override public void setObject(Serializable value) throws IOException { delegate.setObject(value); }  @Override void initialize(AmqpConnection connection); @Override void initialize(AmqpConsumer consumer); @Override byte getJmsMsgType(); boolean isAmqpTypedEncoding(); @Override AmqpJmsObjectMessageFacade copy(); @Override Serializable getObject(); @Override void setObject(Serializable value); @Override void clearBody(); @Override boolean hasBody(); @Override void onSend(long producerTtl); @Override JmsObjectMessage asJmsMessage();  }### Answer:
@Test public void testSetObjectOnNewMessage() throws Exception { String content = "myStringContent"; AmqpJmsObjectMessageFacade amqpObjectMessageFacade = createNewObjectMessageFacade(false); amqpObjectMessageFacade.setObject(content); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(content); oos.flush(); oos.close(); byte[] bytes = baos.toByteArray(); Section section = amqpObjectMessageFacade.getBody(); assertNotNull(section); assertEquals(Data.class, section.getClass()); assertArrayEquals("Underlying message data section did not contain the expected bytes", bytes, ((Data) section).getValue().getArray()); }
@Test public void testSetObjectOnNewAmqpTypedMessage() throws Exception { String content = "myStringContent"; AmqpJmsObjectMessageFacade amqpObjectMessageFacade = createNewObjectMessageFacade(true); amqpObjectMessageFacade.setObject(content); Section section = amqpObjectMessageFacade.getBody(); assertNotNull(section); assertEquals(AmqpValue.class, section.getClass()); assertEquals("Underlying message body did not contain the expected content", content, ((AmqpValue) section).getValue()); }