During Jeroboam’s reign (B.C. 976-945), Israel had reverted to idol worship. Jeroboam had established priests in “high places” including Bethel (House of GOD). What was he thinking? In 1 Kings 13, we find that Our Heavenly Father sent an undisclosed prophet to notify Jeroboam of his sin:
1 and behold, a man of God went from Judah to Bethel by the word of the LORD, and Jeroboam stood by the altar to burn incense. 2 Then he cried out against the altar by the word of the LORD, and said, "O altar, altar! Thus says the LORD: ‘Behold, a child, Josiah by name, shall be born to the house of David; and on you he shall sacrifice the priests of the high places who burn incense on you, and men’s bones shall be burned on you.’ " 3 And he gave a sign the same day, saying, "This is the sign which the LORD has spoken: Surely the altar shall split apart, and the ashes on it shall be poured out."
4 So it came to pass when King Jeroboam heard the saying of the man of God, who cried out against the altar in Bethel, that he stretched out his hand from the altar, saying, "Arrest him!" Then his hand, which he stretched out toward him, withered, so that he could not pull it back to himself. 5 The altar also was split apart, and the ashes poured out from the altar, according to the sign which the man of God had given by the word of the LORD. 6 Then the king answered and said to the man of God, "Please entreat the favor of the LORD your God, and pray for me, that my hand may be restored to me."
So the man of God entreated the LORD, and the king’s hand was restored to him, and became as before. 7 Then the king said to the man of God, "Come home with me and refresh yourself, and I will give you a reward."
8 But the man of God said to the king, "If you were to give me half your house, I would not go in with you; nor would I eat bread nor drink water in this place. 9 For so it was commanded me by the word of the LORD, saying,’You shall not eat bread, nor drink water, nor return by the same way you came.’ " 10 So he went another way and did not return by the way he came to Bethel.
It took a miracle from Our Heavenly Father to save the prophet from certain death by Jeroboam but soon afterwards was killed by a lion due to his disobedience to the Word of the LORD. He had just experienced two miracles, the withered hand and the restoration, yet he trusted the word on an old prophet who lied to him versus the direct Word. Hmmm, make a note of that!
Josiah reigned from 641–609 BC, over 300 years after the prophecy given to Jeroboam and did exactly what was prophesied. Our Heavenly Father knew Josiah before HE formed Josiah in the womb. Along with David and Hezekiah he is one of the three kings who alone did not "commit trespass." His Love for Our Heavenly Father and The Law (which represents the character of Our Heavenly Father) led him to restore the Covenant and tear down and destroy the idols of worship. It is no wonder that he is listed as the sixteenth (Love) generation from Christ!