Arrays.asList(subRecord1String, subRecord2String));
// Construct records and keys
SubRecord1 subRecord1 = SubRecord1.newBuilder().setKeyPart1("1").setKeyPart2("1").setField1("field1_1")
.setField2("field1_2").build();
SubRecord2 subRecord2 = SubRecord2.newBuilder().setKeyPart1("1").setKeyPart2("unmatched").setField1("field2_1")
.setField2("field2_2").build();
Map<String, SpecificRecord> compositeRecord = new HashMap<String, SpecificRecord>();
compositeRecord.put("SubRecord1", subRecord1);
compositeRecord.put("SubRecord2", subRecord2);