Added tests for #85, Code generation for external modules