Practical Microservices: DI suggestion (p. 37, etc.)

I’d suggest that since the code is using the dependency-injection pattern already, sources of impurity like uuid/v4 should be injected to allow testability and make the overall functions pure where possible. Thus the dependencies should include a function with signature () => string rather than the concrete function uuid/v4.