Refactor code
Add test
Not use library anymore. Because we mock it