async def METHOD_NAME(player_factory, player_service):
    player = player_factory()
    lconn = mock.create_autospec(LobbyConnection)
    lconn.write_warning.side_effect = DisconnectedError
    player.lobby_connection = lconn
    player_service[0] = player
    await player_service.shutdown()
    player.lobby_connection.write_warning.assert_called_once()