unit test promises.