The Squaretest plugin for IntelliJ IDEA allows you to generate a test-class with appropriate boilerplate code for your Java class with one keyboard shortcut.