Added tests for promise