Make testing facility for dummy resources

Refactor them out from the zot tests to reuse in well-known testing.
Heh, writing the test case uncovered a bug

Use the content registry to create resources.