### Question:
JmsSessionInfo extends JmsAbstractResource implements Comparable<JmsSessionInfo> { @Override public void visit(JmsResourceVistor vistor) throws Exception { vistor.processSessionInfo(this); } JmsSessionInfo(JmsConnectionInfo connectionInfo, long sessionId);  JmsSessionInfo(JmsSessionId sessionId); JmsSessionInfo copy(); @Override JmsSessionId getId(); @Override void visit(JmsResourceVistor vistor); int getAcknowledgementMode(); void setAcknowledgementMode(int acknowledgementMode); boolean isTransacted(); boolean isSendAcksAsync(); void setSendAcksAsync(boolean sendAcksAsync); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(JmsSessionInfo other); JmsMessageIDPolicy getMessageIDPolicy(); void setMessageIDPolicy(JmsMessageIDPolicy messageIDPolicy); JmsPrefetchPolicy getPrefetchPolicy(); void setPrefetchPolicy(JmsPrefetchPolicy prefetchPolicy); JmsPresettlePolicy getPresettlePolicy(); void setPresettlePolicy(JmsPresettlePolicy presettlePolicy); JmsRedeliveryPolicy getRedeliveryPolicy(); void setRedeliveryPolicy(JmsRedeliveryPolicy redeliveryPolicy); JmsDeserializationPolicy getDeserializationPolicy(); void setDeserializationPolicy(JmsDeserializationPolicy deserializationPolicy);  }### Answer:
@Test public void testVisit() throws Exception { final JmsSessionInfo first = new JmsSessionInfo(firstId); final AtomicBoolean visited = new AtomicBoolean(); first.visit(new JmsDefaultResourceVisitor() { @Override public void processSessionInfo(JmsSessionInfo info) { assertEquals(first, info); visited.set(true); } }); assertTrue(visited.get()); }