this.mockLoadNullInitOffset("topic1", GROUP, new Partition("0-2"));
this.mockLoadNullInitOffset("topic2", GROUP, new Partition("0-0"));
// this.mockLoadNullInitOffset("topic2", GROUP, new
// Partition("1-0"));��load����һ��master�ķ���
this.mockFetchManagerRestart();
this.mockAddFetchRequest(new FetchRequest(new Broker(0, "meta://localhost:0"), 0, new TopicPartitionRegInfo(
"topic1", new Partition("0-0"), 0), 1024 * 1024));
this.mockAddFetchRequest(new FetchRequest(new Broker(0, "meta://localhost:0"), 0, new TopicPartitionRegInfo(
"topic1", new Partition("0-1"), 0), 1024 * 1024));
this.mockAddFetchRequest(new FetchRequest(new Broker(0, "meta://localhost:0"), 0, new TopicPartitionRegInfo(
"topic1", new Partition("0-2"), 0), 1024 * 1024));
this.mockAddFetchRequest(new FetchRequest(new Broker(0, "meta://localhost:0"), 0, new TopicPartitionRegInfo(
"topic2", new Partition("0-0"), 0), 1024 * 1024));
// this.mockAddFetchRequest(new FetchRequest(new Broker(1,
// "meta://localhost:1"), 0, new TopicPartitionRegInfo(
// "topic2", new Partition("1-0"), 0), 1024 * 1024));��������һ��masterץȡ��Ϣ
this.mocksControl.replay();
this.slaveConsumerZooKeeper.registerConsumer(consumerConfig, this.fetchManager, topicSubcriberRegistry,
this.offsetStorage, this.loadBalanceStrategy);
this.mocksControl.verify();
// ��֤�����߷���,ֻ�����Լ�master�µ����з�����
final SlaveZKLoadRebalanceListener listener = this.checkTopic();
final Set<Broker> brokerSet = ConsumerZooKeeperAccessor.getOldBrokerSet(listener);
assertEquals(1, brokerSet.size());
assertTrue(brokerSet.contains(new Broker(0, "meta://localhost:0")));
assertFalse(brokerSet.contains(new Broker(1, "meta://localhost:1")));
}