Refactored test code to source directory /test