What I like to do is create a class that has a field for all external dependencies, as well as static methods. eg:
public class DanceMakerDependecies{ private URL url; public String getCurrentUser(){
I know that purists would prefer to just put everything in a class, but I find this way of testing a lot simpler. try it and see what you think about it (I put it not the best, or a design template, but I like it).
source share