@Before
  public void setup() {
    mockControl = EasyMock.createControl();
    mockTermFactory = mockControl.createMock(I_TermFactory.class);
    mockPropertyValidator = mockControl.createMock(PropertyValidator.class);

    mockTerminologyWrapper = mockControl.createMock(LocalVersionedTerminologyWrapper.class);
  }
  @Override
  @SuppressWarnings("unchecked")
  protected void setUp() throws Exception {
    super.setUp();

    mockControl = EasyMock.createControl();
    personHandlerProvider = (Provider<PersonHandler>) mockControl.createMock(Provider.class);
    appDataHandlerProvider = (Provider<AppDataHandler>) mockControl.createMock(Provider.class);
    activityHandlerProvider = (Provider<ActivityHandler>) mockControl.createMock(Provider.class);
    dispatcher =
        new StandardHandlerDispatcher(
            personHandlerProvider, activityHandlerProvider, appDataHandlerProvider);
  }
  @Before
  public void setUp() {
    this.mocksControl = EasyMock.createControl();
    this.offsetStorage = this.mocksControl.createMock(OffsetStorage.class);
    this.remotingClient = this.mocksControl.createMock(RemotingClientWrapper.class);
    this.fetchManager = this.mocksControl.createMock(FetchManager.class);

    // this.diamondManager = new DefaultDiamondManager(null,
    // "metamorphosis.testZkConfig", (ManagerListener) null);
    this.zkConfig = new ZKConfig(); // DiamondUtils.getZkConfig(this.diamondManager,
    // 10000);
    this.zkConfig.zkConnect = "localhost:2181";
    this.client =
        new ZkClient(
            this.zkConfig.zkConnect,
            this.zkConfig.zkSessionTimeoutMs,
            this.zkConfig.zkConnectionTimeoutMs,
            new ZkUtils.StringSerializer());
    this.metaZookeeper = new MetaZookeeper(this.client, this.zkConfig.zkRoot);
    this.loadBalanceStrategy = new DefaultLoadBalanceStrategy();
    this.slaveConsumerZooKeeper =
        new SlaveConsumerZooKeeper(
            this.metaZookeeper, this.remotingClient, this.client, this.zkConfig, this.brokerId);
  }