Collection<Record> records = new ArrayList();
records.add(TestUtils.makeRecord("ID", "1"));
records.add(TestUtils.makeRecord("ID", "2"));
records.add(TestUtils.makeRecord("ID", "3"));
InMemoryDataSource src = new InMemoryDataSource(records);
RecordIterator it = src.getRecords();
assertTrue("record missing", it.hasNext());
assertEquals("wrong record", it.next().getValue("ID"), "1");
assertTrue("record missing", it.hasNext());
assertEquals("wrong record", it.next().getValue("ID"), "2");