### Question:
AmqpConsumer extends Consumer { public Properties getTransportProperties() { return transportProperties; } AmqpConsumer(ChannelHandlerContext ctx,
                        Broker broker,
                        AmqpChannel channel,
                        String queueName,
                        ShortString consumerTag,
                        boolean isExclusive); @Override void send(Message message); @Override String getQueueName(); @Override void close(); @Override boolean isExclusive(); void enableConsume(); ShortString getConsumerTag(); @Override boolean isReady(); @Override String toString(); Properties getTransportProperties(); static final String CONSUMER_TAG_FIELD_NAME; }### Answer:
@Test public void testGetTransportProperties() throws Exception { AmqpChannel amqpChannel = Mockito.mock(AmqpChannel.class); ChannelHandlerContext context = Mockito.mock(ChannelHandlerContext.class); Broker broker = Mockito.mock(Broker.class); Mockito.when(amqpChannel.getChannelId()).thenReturn(5); Mockito.when(amqpChannel.getConnectionId()).thenReturn(7); AmqpConsumer consumer = new AmqpConsumer(context, broker, amqpChannel, "queue", new ShortString(0, new byte[0]), true); Properties transportProperties = consumer.getTransportProperties(); Assert.assertEquals(transportProperties.get(AmqConstant.TRANSPORT_PROPERTY_CHANNEL_ID), 5, "Incorrect channel id set"); Assert.assertEquals(transportProperties.get(AmqConstant.TRANSPORT_PROPERTY_CONNECTION_ID), 7, "Incorrect connection id set"); }