Bug 1015084: unit tests and fixes for NfcBuffer