1 Kings 3:25-28 ESV  And the king said, “Divide the living child in two, and give half to the one and half to the other.”  (26)  Then the woman whose son was alive said to the king, because her heart yearned for her son, “Oh, my lord, give her the living child, and by no means put him to death.” But the other said, “He shall be neither mine nor yours; divide him.”  (27)  Then the king answered and said, “Give the living child to the first woman, and by no means put him to death; she is his mother.”  (28)  And all Israel heard of the judgment that the king had rendered, and they stood in awe of the king, because they perceived that the wisdom of God was in him to do justice.

This account of course is given to us in Scripture to demonstrate that the Lord had indeed given King Solomon wisdom that could only come from the Spirit of God. Solomon, in this, is a picture of the Messiah who will one day judge the earth in perfect, unfailing, all-knowing wisdom.
As I read these verses, the whole child custody, family court business came to mind. Because actually what Solomon was dealing with was a child custody case, and to resolve it with perfect justice, he needed to find out which woman was lying – which was evil and which was righteous. By the Lord’s own wisdom, he was able to get to the bottom of it.