@Test
public void testAddDestinationDetailsToMapIfNeeded() throws JMSException {
Queue queue = mock(Queue.class);
when(queue.getQueueName()).thenReturn("mock-queue");
Operation op = new Operation();
OperationMap map = op.createMap("test-map");
addDestinationDetailsToMapIfNeeded(queue, map, null, Collections.<String>emptyList(), "test");
String type = map.get("test" + TYPE, String.class);
String name = map.get("test" + NAME, String.class);
assertNotNull(type);
assertNotNull(name);
assertEquals(type, DestinationType.Queue.name());
assertEquals(name, "mock-queue");
queue = null;
op = new Operation();
map = op.createMap("test-map");
addDestinationDetailsToMapIfNeeded(queue, map, null, Collections.<String>emptyList(), "test");
type = map.get("test" + TYPE, String.class);
name = map.get("test" + NAME, String.class);