Tests for ApplicationException.