I\'ve just had an argument with someone I work with and it\'s really bugging me. If you have a class which just has methods like calculateRisk
or/and calc
While you could use JMockit or any similar tool to mock out the static methods, my own personal choice would be to avoid statics where possible since static methods often increase coupling.
Some of the answers implies that the method is stateless, but I don't really want to see it that way. The method accepts state in form of method parameters. What if those parameters were state in an object instead?