registry/endpoint: make it testable

@crosbymichael  and @dmcgowan I know it's too late for 1.3, but this adds back the tests we started, and make the initializer more testable.

Signed-off-by: Vincent Batts <vbatts@redhat.com>