async function sendMessage(message) {
  if (adapter === null) {
    throw new Error('Cannot call sendMessage outside of a test');
  }

  const msg = await new Promise((resolve, reject) => {
    // eslint-disable-next-line ember/no-runloop
    next(async () => {
      let normalized = {
        applicationId: 'my-app',
        applicationName: 'My App',
        ...message,
        from: 'inspectedWindow',
      };
      try {
        adapter._messageReceived(normalized);
      } catch (e) {
        return reject(e);
      }

      resolve(normalized);
    });
  });

  await settled();
  return msg;
}
Send a message to the adapter.

@method expectOpenResource
@param {Object} message    The message.
@return {Promise}          Resolves when the message is delivered.