title: execute Java code only in tests
body: <p>There is a rule I would like to enforce in unit tests so that new code doesn't violate the rule. But I would like to just print warning out in production environment to allow production function regardless while I am cleaning it up.</p>
  
  <p>I wonder if it's possible in Java to do the above in a clean way?
  Thanks!</p>