Look at the context. God is the God of the living, the spiritually living. Those who denied the resurrection were challenging Jesus about the absurdidty of marriage as it pertains to the Levitical law of brothers who died without issue. Marriage belongs to those alive on Earth, not in Heaven. The context has NOTHING to do with communicating across the life/death boundary.
The communication is for pray only. We are to be imitators of Christ as Paul tells us. Nothing wrong with asking for pray. Yes. You can test the spirit according to the Apostle John in his writings. You just don’t see it.
http://fisheaters.com/saints.html