Broke out and tested utility methods in ApiUtils module