Github user d2r commented on the pull request:

    https://github.com/apache/storm/pull/1030#issuecomment-173704553
  
    > I will post a link when I have an example.
    
    new 
[staticmocking](https://github.com/d2r/storm/tree/56d48faac918123af46f1e021e38549fa6a4cf6c/storm-core/src/jvm/org/apache/storm/testing/staticmocking)
 package
    
    See example methods under test: 
[Utils](https://github.com/d2r/storm/blob/56d48faac918123af46f1e021e38549fa6a4cf6c/external/storm-hbase/src/main/java/org/apache/storm/hbase/common/Utils.java)
    
    Here is a (clojure) example of 
[usage](https://github.com/d2r/storm/blob/56d48faac918123af46f1e021e38549fa6a4cf6c/storm-core/test/clj/org/apache/storm/logviewer_test.clj#L372-L387).
 This will all eventually be Java, and it would use a try-with-resources syntax 
in place of the `with-open`.
    
    If this seems like a good pattern to follow, we can add it to the 
[migration 
guidelines](https://cwiki.apache.org/confluence/display/STORM/Java+Migration+Guidelines).


---
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