test(resource): add resource.replace test