function expectOpened(/** number= */ times = undefined) {
  mockOpenedHandler.handleEvent(new ArgumentMatcher(
      (arg) => arg.type == AbstractDialogPlugin.EventType.OPENED));
  mockField.dispatchSelectionChangeEvent();
  if (times) {
    mockOpenedHandler.$times(times);
    mockField.$times(times);
  }
}
Sets up the mock event handler to expect an OPENED event.
@suppress {missingProperties} suppression added to enable type checking