Clean tests

clean up test infrastructure a bit and add a test which demonstrates the "double definition" problem in spatial.