Update examples/ and test/ to avoid deprecated call.