public async void internalTestThrowException(EventWaitHandle waitHandle) { try { await remote.ThrowExceptionAsync(); TestUtils.fail(log, "Exception expected"); } catch (Exception ex) { TestUtils.assertEquals(log, "Exception message wrong", true, ex.ToString().IndexOf("throwException") >= 0); } finally { waitHandle.Set(); } }