How to grow cocoa beans in Minecraft?

In Minecraft, cocoa beans may be cultivated by planting them on the sides of jungle wood logs or jungle tree trunks. They will develop into a cocoa pod that may be harvested for cocoa beans once planted.