Added sample test for promises API.