Iterator<Record1> it1 = r1.iterator();
assertNotNull(it1);
assertTrue(it1.hasNext());
int c1 = 0;
while (it1.hasNext()) {
Record1 rec = it1.next();
assertNotNull(rec);
if (c1 == 0) {
//ADD;CREDIT;55555555555;DIRECT;backend processing;valid=1;quantity=10
assertEquals("ADD", rec.getAction());
assertEquals("CREDIT", rec.getSubject());
assertEquals("55555555555", rec.getCustomer());
assertEquals("DIRECT", rec.getChannel());
assertEquals("backend processing", rec.getSource());
assertNotNull(rec.getParameters());
assertEquals(2, rec.getParameters().size());
assertEquals("valid=1", rec.getParameters().get(0));
assertEquals("quantity=10", rec.getParameters().get(1));
} else if (c1 == 1) {
//REMOVE;SERVICE;66666666666;DIRECT;backend processing;param1=value1;param2=value2;param3=value3
assertEquals("REMOVE", rec.getAction());
assertEquals("SERVICE", rec.getSubject());
assertEquals("66666666666", rec.getCustomer());
assertEquals("DIRECT", rec.getChannel());
assertEquals("backend processing", rec.getSource());
assertNotNull(rec.getParameters());
assertEquals(3, rec.getParameters().size());
assertEquals("param1=value1", rec.getParameters().get(0));
assertEquals("param2=value2", rec.getParameters().get(1));
assertEquals("param3=value3", rec.getParameters().get(2));
} else if (c1 == 2) {
//ADD;RADIO;55555555555;DIRECT;"backend processing; ""test"""
assertEquals("ADD", rec.getAction());
assertEquals("RADIO", rec.getSubject());
assertEquals("55555555555", rec.getCustomer());
assertEquals("DIRECT", rec.getChannel());
assertEquals("backend processing; \"test\"", rec.getSource());
} else if (c1 == 4) {
//SELL;MATERIAL1;11111111111;DIRECT;backend processing;a;b;c;d;
assertEquals("SELL", rec.getAction());
assertEquals("MATERIAL1", rec.getSubject());
assertEquals("11111111111", rec.getCustomer());
assertEquals("DIRECT", rec.getChannel());
assertEquals("backend processing", rec.getSource());
assertNotNull(rec.getParameters());
assertEquals(4, rec.getParameters().size());
assertEquals("a", rec.getParameters().get(0));
assertEquals("b", rec.getParameters().get(1));
assertEquals("c", rec.getParameters().get(2));
assertEquals("d", rec.getParameters().get(3));
} else if (c1 == 7) {
//123
assertEquals("123", rec.getAction());
assertNull(rec.getSubject());
assertNull(rec.getCustomer());
assertNull(rec.getChannel());
assertNull(rec.getSource());
}
c1++;
}
assertTrue(c1 >= 8);
r1.closeResources();