Add a test factory for creating resources