moved test code from src/main to src/test