Type2NdefOperations extends AbstractNdefOperations { @Override public List<Record> readNdefMessage() { assertFormatted(); if (lastReadRecords != null) { return lastReadRecords; } else { TypeLengthValueReader reader = new TypeLengthValueReader(new TagInputStream(memoryLayout, readerWriter)); convertRecords(reader); return lastReadRecords; } } Type2NdefOperations(MemoryLayout memoryLayout, MfUlReaderWriter readerWriter, TagInfo tagInfo,
			boolean formatted, boolean writable); MemoryLayout getMemoryLayout(); @Override int getMaxSize(); @Override List<Record> readNdefMessage(); @Override void writeNdefMessage(Record... records); @Override void makeReadOnly(); @Override void format(Record... records);  }
@Test public void testReadNdefMessages() throws Exception { for (Config config : READ_TEST) { init(config); List<Record> ndefMessage = ndefOperations.readNdefMessage(); assertEquals(1, ndefMessage.size()); UriRecord record = (UriRecord)ndefMessage.get(0); assertEquals("http: } }
@Test public void testReadNdefMessagesEmpty() throws Exception { for (Config config : READ_EMPTY_TEST) { init(config); List<Record> ndefMessage = ndefOperations.readNdefMessage(); assertEquals(0, ndefMessage.size()); } }