def METHOD_NAME(self, _mock_cluster_state, monkeypatch):
    """Test launch and exec on existing clusters with mismatched resources."""
    task = sky.Task(run='echo hi')
    # Accelerators mismatch
    task.set_resources(sky.Resources(accelerators='V100:8'))
    self._run_launch_exec_with_error(task, 'test-cluster1')
    self._run_launch_exec_with_error(task, 'test-cluster2')
    task.set_resources(sky.Resources(accelerators='A100:8'))
    self._run_launch_exec_with_error(task, 'test-cluster2')
    self._run_launch_exec_with_error(task, 'test-cluster3')
    # Cloud mismatch
    task.set_resources(sky.Resources(sky.AWS(), accelerators='V100'))
    self._run_launch_exec_with_error(task, 'test-cluster2')
    task.set_resources(sky.Resources(sky.GCP()))
    self._run_launch_exec_with_error(task, 'test-cluster1')