Add test for external references