use function inspection to mock or replace vars, objects, functions hidden inside other functions