Testing and Final Construction of the Superconducting Magnet for the Alpha Magnetic Spectrometer