cleanup and basic tests for a test definition