Implement command "checkout"
Add test for command "checkout"