Rainer,
You ask a big question without much information on the context.
The Cucumber School video course (
https://cucumber.io/school) is a great
intro to using BDD and the Three Amigos to create the tests. I've used
dbUnit for setting up test data for tests implemented with Java. I've
also used the Adapter Pattern to isolate my domain model from the
database, allowing the adapter to be mocked for testing. (see
https://leanpub.com/EvolutionaryAnatomy/) These ideas might give you
starting points.
- George
--
----------------------------------------------------------------------
* George Dinwiddie *
http://blog.gdinwiddie.com
Software Development
http://www.idiacomputing.com
Consultant and Coach
http://www.agilemaryland.org
----------------------------------------------------------------------