Added tests for list function