How to make objects follow armature bone shape? (images included) This probably is a very simple thing but I'm not able to figure out as I am very new to blender and animation.
I want to do a paper folding animation and I am stuck at beginning itself :D
I have a plane(actually a cube) and an armature setup as shown below.


After I apply parenting with armature and move the bones in pose mode I could get the plane to move but they are not following the bones
 

I wanted it like this for accurate positioning(shown in black line). I've kept the length of second bone to be same as the middle portion of the plane. I am thinking maybe a bone constraint would help not able to figure out which one. 


Thanks in advance!
Looks like you have weighting wrong: delete the armature modifier you have created, select the paper, then the armature, then Ctrl P and choose "with EMPTY GROUPS option".
This option will create 3 empty vertex group with the same name of the three bones,  that can be manually weighted:
select the paper and enter in edit mode
select the vertex group tab in the properties window, select the first bone, select all the vertices around the first portion of the plane and click assign.
Do the same with the others two bones/portions of plane.

Done.