Debugging unit tests run on cmd line using Eclipse
The Maven Surefire Plugin allows for the remote debugging of unit tests.
You simply need to call maven using the following command:
mvn -Dmaven.surefire.debug test
The tests will automatically pause and await a remote debugger on port 5005. You can then attach to the running tests using Eclipse. You can setup a "Remote Java Application" launch configuration via the menu command "Run" > "Open Debug Dialog..."