protect from exception in test