Add a test for autoAttach