Utility to facilitate mocking non-interactive commands