def METHOD_NAME(capsys: Any, loop: Any) -> None:
    services, future = start_service("tests/services/dummy_service.py", loop=loop)
    instance = services.get("test_dummy")
    with pytest.raises(AWSSNSSQSException):
        loop.run_until_complete(AWSSNSSQSTransport.publish(instance, "data", "test-topic", wait=True))
    async def _async_kill():
        tomodachi.exit()
    loop.create_task(_async_kill())
    loop.run_until_complete(future)
    if not future.done():
        future.set_result(None)
    out, err = capsys.readouterr()
    assert "The security token included in the request is invalid" in (out + err)