tests: Add ResourceLoaderTestCase and abstract context creation

Change-Id: Ib4b265256e60a2f2109da73dc7edba6a75587ce2
Merge "tests: Add ResourceLoaderTestCase and abstract context creation"