title: Java mock database connection
body: <p>I want to test class with make db connection. Class that I want to test accept as param in constructor <code>Connection</code> class. I want to pass mock object to the constructor. Can you tell me good framework with example how to mock db connection?</p>