Check buffer capacity explicitly
Add test to submit DATA frame twice

This commit adds test to submit DATA frame twice and fixes the bug
that 2nd DATA is not sent.