### Question:
IAMReader extends IAMStream { public JSONObject read(IAMIndex index) { return readFromSelection(index, null); } IAMReader(String id); JSONObject read(IAMIndex index); JSONObject readFromSelection(IAMIndex index, List<Transaction> selection); String getID();  }### Answer:
@Test public void testMultipleIAMPacketConflicts() { JSONObject message1 = new JSONObject().put("planet", "mars"); JSONObject message2 = new JSONObject().put("planet", "venus"); iamWriter.write(new IAMIndex(100), message1); assertNotNull(iamReader.read(new IAMIndex(100))); iamWriter.write(new IAMIndex(100), message1); assertNotNull(iamReader.read(new IAMIndex(100))); iamWriter.write(new IAMIndex(100), message2); assertNull(iamReader.read(new IAMIndex(100))); }