Add mocking for second command test involving the API