Update test to work with the promise api