Read 1 Kings 22:1-29.  Micaiah was imprisoned after he delivered the words of Yahweh to Ahab.  He probably knew at the outset that this was likely to happen.  Did he have to prophesy?