Here is my unit test code:
runner.setProperty(....);
RecordSchema inputRecordSchema = ....create schema based on RecordField
final Object[] recordArray = recordArray(inputRecordSchema); // create records(instances of MapRecord)
parser.addRecord((Object) recordArray);
....
Object[] recordArray(RecordSchema schema){
Record record = new MapRecord(schema, new HashMap<String, Object> {
{
put(...)
...
...
}
}
.....
}
In main code, I iterate records from reader:
while((record = reader.nextRecord()) != null) {
//process record
}
But I see that record, though MapRecord instance, is empty.
Seems I am missing some step in unit test.
How to sort it out?