Load and embed resources bug fixes
Fix incorrect parameter type
Backport unit test improvements from the api-tests project
bug fixes