Added Attach/Detach tests