function expectCancel() {
  mockCancelHandler.handleEvent(new ArgumentMatcher(
      (arg) => arg.type == AbstractDialog.EventType.CANCEL));
}
Sets up the mock event handler to expect a CANCEL event.
@suppress {missingProperties} suppression added to enable type checking