Test refactor and adding more test