### Question:
JmsInboundMessageDispatch extends JmsAbstractResourceId { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } JmsInboundMessageDispatch other = (JmsInboundMessageDispatch) obj; if (sequence != other.sequence) { return false; } if (messageId == null) { if (other.messageId != null) { return false; } } else if (!messageId.equals(other.messageId)) { return false; } if (consumerId == null) { if (other.consumerId != null) { return false; } } else if (!consumerId.equals(other.consumerId)) { return false; } return true; } JmsInboundMessageDispatch(long sequence); JmsMessage getMessage(); void setMessage(JmsMessage message); JmsConsumerId getConsumerId(); void setConsumerId(JmsConsumerId consumerId); void setMessageId(Object object); void setEnqueueFirst(boolean insertAtFront); boolean isEnqueueFirst(); boolean isDelivered(); void setDelivered(boolean delivered); boolean isRecovered(); void setRecovered(boolean recovered); int getRedeliveryCount(); JmsConsumerInfo getConsumerInfo(); void setConsumerInfo(JmsConsumerInfo consumerInfo); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testEqualsWithNullAndOtherTypes() { JmsInboundMessageDispatch envelope = new JmsInboundMessageDispatch(1); assertFalse(envelope.equals(null)); assertFalse(envelope.equals("")); }