@Test
public void testSendMessage_PartitionNumRight_butHaveFewLocalMessage2() throws Exception {
// �����Ѿ�����,���ػ�������������Ϣ��ͣ��һ���ټ��,�ڶ��μ�������Ϣ�ָ����,������Ϣд������,�л�����������ģʽ
final Message message = this.createDefaultMessage();
EasyMock.expect(this.producer.getLocalMessageCount(message.getTopic(), this.partition)).andReturn(10);
EasyMock.expect(this.producer.getLocalMessageCount(message.getTopic(), this.partition)).andReturn(0);
EasyMock.expect(this.producer.selectPartition(message)).andReturn(new Partition("0-0")).times(2);
EasyMock.expect(this.producer.sendMessageToServer(message, 10000, TimeUnit.MILLISECONDS, true)).andReturn(null);
this.producer.tryRecoverMessage(message.getTopic(), this.partition);
EasyMock.expectLastCall().times(1);
this.mocksControl.replay();
this.sender.sendMessage(message, 10000, TimeUnit.MILLISECONDS);
this.mocksControl.verify();
}