def METHOD_NAME():
    if settings.TEST_SERVER_MODE:
        raise SkipTest("Unable to manipulate time in ServerMode")
    with freeze_time("2015-01-01 12:00:00"):
        client = setup_workflow_boto3()
        decision_token = client.poll_for_decision_task(
            domain="test-domain", taskList={"name": "queue"}
        )["taskToken"]
        client.respond_decision_task_completed(
            taskToken=decision_token, decisions=[SCHEDULE_ACTIVITY_TASK_DECISION]
        )
        client.poll_for_activity_task(
            domain="test-domain",
            taskList={"name": "activity-task-list"},
            identity="surprise",
        )
    with freeze_time("2015-01-01 12:04:30 UTC"):
        resp = client.get_workflow_execution_history(
            domain="test-domain",
            execution={"runId": client.run_id, "workflowId": "uid-abcd1234"},
        )
        assert resp["events"][-1]["eventType"] == "ActivityTaskStarted"
    with freeze_time("2015-01-01 12:05:30 UTC"):
        # => Activity Task Heartbeat timeout reached!!
        resp = client.get_workflow_execution_history(
            domain="test-domain",
            execution={"runId": client.run_id, "workflowId": "uid-abcd1234"},
        )
        assert resp["events"][-2]["eventType"] == "ActivityTaskTimedOut"
        attrs = resp["events"][-2]["activityTaskTimedOutEventAttributes"]
        assert attrs["timeoutType"] == "HEARTBEAT"
        # checks that event has been emitted at 12:05:00, not 12:05:30
        assert isinstance(resp["events"][-2]["eventTimestamp"], datetime)
        ts = resp["events"][-2]["eventTimestamp"]
        assert ts == dtparse("2015-01-01 12:05:00 UTC")