add test case for Deferred, fix Deferred.notifyWith