Github user satishd commented on the pull request:

    https://github.com/apache/storm/pull/1192#issuecomment-193793125
  
    @abhishekagarwal87 @hustfxj 
    I do not think @Before annotation can be used here as it needs to create 
storage for different HBServerMessageType instances in test methods.
    
    You may want to extract methods like below and use it in respective test 
methods.  
    ``` java
    public PaceMakerStateStorage 
createPaceMakerStateStorage(HBServerMessageType messageType) {
      return createPaceMakerStateStorage(createPaceMakerStateStorage, null);
    }
    
    public PaceMakerStateStorage 
createPaceMakerStateStorage(HBServerMessageType messageType, HBMessageData 
messageData) {
      HBMessage response = new HBMessage(messageType, messageData);
      PaceMakerClientProxy clientProxy = new PaceMakerClientProxy(response, 
null);
      PaceMakerStateStorage stateStorage = new 
PaceMakerStateStorage(clientProxy, null);
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to