Added LockTest.
Refactored test packages.