public static Optional<DefaultMqPushConsumerWrapper> wrapPushConsumer(DefaultMQPushConsumer pushConsumer) {
        DefaultMQPushConsumerImpl pushConsumerImpl = pushConsumer.getDefaultMQPushConsumerImpl();
        MQClientInstance mqClientFactory = pushConsumerImpl.getmQClientFactory();

        // Obtain the defaultMQPushConsumerImpl and mQClientFactory attribute values related to the consumer. If the
        // attribute value is null, do not cache the consumer
        if (pushConsumerImpl != null && mqClientFactory != null) {
            DefaultMqPushConsumerWrapper wrapper = new DefaultMqPushConsumerWrapper(pushConsumer, pushConsumerImpl,
                    mqClientFactory);
            initWrapperServiceMeta(wrapper);
            return Optional.of(wrapper);
        }
        return Optional.empty();
    }
@Test
    public void testWrapPushConsumer() {
        Optional<DefaultMqPushConsumerWrapper> pushConsumerWrapperOptional = RocketMqWrapperUtils
                .wrapPushConsumer(pushConsumer);
        Assert.assertTrue(pushConsumerWrapperOptional.isPresent());
        Assert.assertEquals(pushConsumerWrapperOptional.get().getPushConsumer(), pushConsumer);
    }