Adds a working createAppResourceFactory function with unit tests.