### Question:
RecordImplFactory { public Record createRootRecord(final String name, final Structure structure) { return new RecordImpl(name, structure, null); }  Record createNestedRecord(final Structure structure, final Record parent); Record createRootRecord(final String name, final Structure structure);  }### Answer:
@Test public void testCreateRootRecord() { final RecordImplFactory factory = new RecordImplFactory(); final Map<String, Field> mapRootFields = new HashMap<String, Field>(); mapRootFields.put("name", new PrimitiveFieldImpl("name", DataType.VC)); mapRootFields.put("id", new PrimitiveFieldImpl("id", DataType.F8)); final Structure rootStructure = new StructureImpl(mapRootFields); final Record record = factory.createRootRecord("root_record", rootStructure); assertThat(RecordImpl.class.isInstance(record)); }