### Question:
DisconnectMessage extends Message { @Override public void setQos(QoS qos) { throw new UnsupportedOperationException("DISCONNECT message does not support the QoS flag"); } DisconnectMessage();  DisconnectMessage(Header header); @Override void setDup(boolean dup); @Override void setQos(QoS qos); @Override void setRetained(boolean retain);  }### Answer:
@Test(expected = UnsupportedOperationException.class) public void qosFlagsAreNotAllowed() { msg.setQos(QoS.AT_LEAST_ONCE); }