To test a fully assembled system, a database must be properly integrated into the set-up and tear-down of the test environment. With Neo4j, JVM-friendly developers have a distinct advantage because the database can be instantiated directly in code. Though this is incredibly convenient, it still takes a bit of work to get it set up properly.
Now, NoSQLUnit makes it even easier, providing great support for easily bootstrapping a Neo4j server into your unit testing. Read their full blog post for all the details about how to get started.