### Question:
GenericDbSchema extends HashMap<String, ArrayList<String>> { public Record record(String fileType) { return this.new Record(fileType); } GenericDbSchema(String filename); void load(); Record record(String fileType); Parser parser(String fileType, File file, String encoding, char sep);  }### Answer:
@Test public void testRecord() throws Exception { String schemaFilename = getClass().getResource("/SCHEMA.txt").getFile(); GenericDbSchema schema = new GenericDbSchema(schemaFilename); schema.load(); Record record = schema.record("ORGANISMS"); record.set("ID", 1); record.set("NAME", "test"); record.set("TAXONOMY_ID", "2112"); try { record.set("This is not a valid field", "so this shouldn't work"); fail("assigned to invalid field"); } catch (IllegalArgumentException e) {} assertEquals("test", record.get("NAME")); assertEquals("", record.get("DESCRIPTION")); assertEquals("1\ttest\t\t\t\t2112\n", record.toString()); try { record.set("INVALID", "THIS BETTER FAIL"); fail("expected exception"); } catch (Exception e) {} }