The Buddha describes how he attained certainty as to his awakening by thoroughly understanding the enjoyment to be had from, the poverty of and the way to terminate body, sense-experience, perception, own-making and consciousness.
Read the Sutta
Index of Available translations: SN 3.22.26
Assada, adinava, and nissarana. Woodward: satisfaction, misery, escape. Bodhi: Gratification, danger, escape. Assada is neither satisfaction, which is the state of having had enough; nor gratification which is the state of having reached a point where one is thankful to have had an experience; it is just the experiencing itself of whatever pleasure is to be had. Adinava im-poverished, miserable. That is the danger, but the word is not 'danger'. Nissarana out-the on-flow. It is less the escape from than the stopping of the on-flow of body, etc. The difference being that 'escape' more even than 'release from' or 'freedom from' implies an escapee, but the emphasis here is much more on the stopping of the on-rolling of the khandhas than the freedom from them.