This article by Lasse Koskela, provides several tips on how to improve the speed of your Java unit tests. The strategy to improve the speed up test code is to find slow things and either make them run faster or not run them at all.
In this blog post, Nicolas Frankel explains how to perform unit testing on a database using DBUnit, Spring and TestNG. DbUnit is a JUnit extension for database-driven projects that, among other things, puts your database into a known state between test runs. This is an excellent tool to avoid the issues that can occur when one test case corrupts the database and causes subsequent tests to fail. DbUnit has also the ability to export and import your database data to and from XML datasets.
In this article, Brett Schuchert discusses how modern mocking tools affects positively our ability to work with legacy code and the possible negative implications of using mocking tools. These tools allow us to perform unit testing without actually changing the underlying code. He starts with a discussion about the challenges of unit testing and how mocking tools help to solve them; at least on the surface.