I would like to write some unit tests for custom components. I was wondering if there is an easy way how to do this preferably using JUnit or TestNG. I would like to do following things within an unit tests:

1) start (multiple) SF daemon(s)
2) deploy custom components
3) test component logic, inspect SmartFrog environment
4) stop SF daemon(s)

Do I have to implemnt all this or is there something I can reuse?