Write test for list command