Fixed error when throwing exception. Fixed objectoutofservice test