registry/endpoint: make it testable

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Merge pull request #8387 from vbatts/vbatts-registry_test_enpoint

registry/endpoint: make it testable