### Question:
DatamartToGenericDb { public void build(String dir, long organismId) throws DatamartException { try { Organism organism = dmdb.getOrganismDao().queryForId((int) organismId); String schemaFilename = makeFilename(dir, SCHEMA_FILETYPE); makeSchema(schemaFilename); GenericDbSchema schema = new GenericDbSchema(schemaFilename); schema.load(); makeOrganisms(schema, dir, organism); makeNamingSourceIds(schema, dir); Set<Integer> nodes = makeIdentifiers(schema, dir, organism); makeNodes(schema, dir, organism, nodes); makeNetworks(dir, organism); makeStubGenericDbFiles(dir); } catch (IOException e) { throw new DatamartException("Failed to create generic db", e); } catch (SQLException e) { throw new DatamartException("Failed to create generic db", e); } }  void build(String dir, long organismId); static String makeShortName(String name); void resourceToFile(String resourceName, String outputPath); DatamartDb getDatamartDb(); void setDatamartDb(DatamartDb datamartDb); static final String SCHEMA_FILETYPE; static final String ORGANISMS_FILETYPE; static final String IDENTIFIERS_FILETYPE; static final String NODES_FILETYPE; static final String GENE_NAMING_SOURCES_FILETYPE; }### Answer:
@Test public void test() throws Exception { assertNotNull(datamartToGenericDb); DataSetContext context = dataSetManagerService.getContext(testDataBuilder.testOrganismId); datamartToGenericDb.build(context.getGenericDbPath(), testDataBuilder.testOrganismId); exists(context, "SCHEMA.txt"); exists(context, "ORGANISMS.txt"); exists(context, "NETWORKS.txt"); exists(context, "NODES.txt"); exists(context, "GENES.txt"); int n = countLines(context, "NODES.txt"); System.out.println("NODES.txt length: " + n); n = countLines(context, "GENES.txt"); System.out.println("GENES.txt length: " + n); }