Remvoe old test and fix up test infrastructure.
Add tests.