Added basic test for detach