Implementing resource loading using mocks