Add tests for calling from command line.