Add unit test on uncovered function, move test data from src/ to test/

It's better to have all test data in test/ rather than in src/