Add tests for assembling buffers

Change-Id: Ic50925c66ef8cf046751fdf6684f898fc83de8f0