Fixed unit test to pass by resolving promise.