MfClassicNdefOperations extends AbstractNdefOperations { @Override public List<Record> readNdefMessage() { assertFormatted(); if (lastReadRecords != null) { return lastReadRecords; } else { try { Application application = getApplication(); byte[] tlvWrappedNdefMessage = application.read(new KeyValue(Key.A, MfConstants.NDEF_KEY)); if (log.isDebugEnabled()) log.debug(NfcUtils.convertBinToASCII(tlvWrappedNdefMessage)); TypeLengthValueReader reader = new TypeLengthValueReader( new ByteArrayInputStream(tlvWrappedNdefMessage)); convertRecords(reader); return lastReadRecords; } catch (IOException e) { throw new NfcException(e); } } } MfClassicNdefOperations(MfClassicReaderWriter readerWriter, TagInfo tagInfo, boolean formatted,
			boolean writeable); @Override int getMaxSize(); @Override List<Record> readNdefMessage(); @Override void writeNdefMessage(Record... records); @Override void makeReadOnly(); @Override void format(Record... records);  }
@Test public void testReadNewMessages() throws Exception { for (Config config : READ_TEST) { init(config); List<Record> ndefMessage = ndefOperations.readNdefMessage(); assertEquals(1, ndefMessage.size()); } }