updating test to ensure that onClose handler gets called exactly once
changing content length type to long