### Question:
JmsMessage implements javax.jms.Message { @Override public byte getByteProperty(String name) throws JMSException { Object value = getObjectProperty(name); if (value == null) { throw new NumberFormatException("property " + name + " was null"); } Byte rc = (Byte) TypeConversionSupport.convert(connection, value, Byte.class); if (rc == null) { throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a byte"); } return rc.byteValue(); } JmsMessage(JmsMessageFacade facade); JmsMessage copy(); @Override int hashCode(); @Override boolean equals(Object o); @Override void acknowledge(); @Override void clearBody(); boolean isReadOnlyBody(); void setReadOnlyBody(boolean readOnlyBody); void setReadOnlyProperties(boolean readOnlyProperties); @Override String getJMSMessageID(); @Override void setJMSMessageID(String value); void setJMSMessageID(JmsMessageId messageId); @Override long getJMSTimestamp(); @Override void setJMSTimestamp(long timestamp); @Override String getJMSCorrelationID(); @Override void setJMSCorrelationID(String correlationId); @Override byte[] getJMSCorrelationIDAsBytes(); @Override void setJMSCorrelationIDAsBytes(byte[] correlationId); @Override Destination getJMSReplyTo(); @Override void setJMSReplyTo(Destination destination); @Override Destination getJMSDestination(); @Override void setJMSDestination(Destination destination); @Override int getJMSDeliveryMode(); @Override void setJMSDeliveryMode(int mode); @Override boolean getJMSRedelivered(); @Override void setJMSRedelivered(boolean redelivered); @Override String getJMSType(); @Override void setJMSType(String type); @Override long getJMSExpiration(); @Override void setJMSExpiration(long expiration); @Override int getJMSPriority(); @Override void setJMSPriority(int priority); @Override void clearProperties(); @Override boolean propertyExists(String name); Map<String, Object> getProperties(); void setProperty(String key, Object value); Object getProperty(String key); @SuppressWarnings("rawtypes") @Override Enumeration getPropertyNames(); @SuppressWarnings("rawtypes") Enumeration getAllPropertyNames(); @Override void setObjectProperty(String name, Object value); void setObjectProperty(String name, Object value, boolean checkReadOnly); void setProperties(Map<String, Object> properties); @Override Object getObjectProperty(String name); @Override boolean getBooleanProperty(String name); @Override byte getByteProperty(String name); @Override short getShortProperty(String name); @Override int getIntProperty(String name); @Override long getLongProperty(String name); @Override float getFloatProperty(String name); @Override double getDoubleProperty(String name); @Override String getStringProperty(String name); @Override void setBooleanProperty(String name, boolean value); void setBooleanProperty(String name, boolean value, boolean checkReadOnly); @Override void setByteProperty(String name, byte value); @Override void setShortProperty(String name, short value); @Override void setIntProperty(String name, int value); @Override void setLongProperty(String name, long value); @Override void setFloatProperty(String name, float value); @Override void setDoubleProperty(String name, double value); @Override void setStringProperty(String name, String value); Callable<Void> getAcknowledgeCallback(); void setAcknowledgeCallback(Callable<Void> acknowledgeCallback); void onSend(); JmsConnection getConnection(); void setConnection(JmsConnection connection); boolean isExpired(); void incrementRedeliveryCount(); JmsMessageFacade getFacade(); boolean isRedelivered(); void setRedelivered(boolean redelivered);  }### Answer:
@Test public void testGetByteProperty() throws JMSException { JmsMessage msg = factory.createMessage(); String name = "byteProperty"; msg.setByteProperty(name, (byte) 1); assertTrue(msg.getByteProperty(name) == 1); }