Yep. In this case, this was done for better testability of that factory as a single unit (by injection). Like you suggested, it's worth discussing alternatives to test promises.