Added a test case for AttachCommand and fixed a typo in the javadoc