    @Test(expected = IllegalArgumentException.class)
    public void testEncode_badQos() throws Exception {

        m_msg.setQos(AbstractMessage.QOSType.EXACTLY_ONCE);

        //Exercise
        m_encoder.encode(m_mockedContext, m_msg, m_out);
    }