@Override
    public SendResult send(
        Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException {
        msg.setTopic(withNamespace(msg.getTopic()));
        if (this.getAutoBatch() && !(msg instanceof MessageBatch)) {
            return sendByAccumulator(msg, null, null);
        } else {
            return sendDirect(msg, null, null);
        }
    }
@Test
    public void assertSendByQueue() throws MQBrokerException, RemotingException, InterruptedException, MQClientException, NoSuchFieldException, IllegalAccessException {
        setDefaultMQProducerImpl();
        MessageQueue mq = mock(MessageQueue.class);
        SendResult send = producer.send(message, mq);
        assertNull(send);
        send = producer.send(message, mq, defaultTimeout);
        assertNull(send);
        Collection<Message> msgs = Collections.singletonList(message);
        send = producer.send(msgs, mq);
        assertNull(send);
        send = producer.send(msgs, mq, defaultTimeout);
        assertNull(send);
    }