Add test for external closures