Loader { int loadRobinsonMorphology() { this.addUpdate("install_grammar"); LOGGER.debug("Loading robinson morphology"); final EntityIndexWriterImpl writer = this.entityManager.getNewWriter("morphology"); new StreamingCsvModuleLoader(writer, this.coreProperties.getProperty("test.data.path.morphology.robinson")).init(this); final int total = writer.close(); LOGGER.debug("End of morphology"); this.addUpdate("install_grammar_complete", total); return total; } @Inject  Loader(final JSwordPassageService jsword, final JSwordModuleService jswordModule,
                  @Named("StepCoreProperties") final Properties coreProperties, final EntityManager entityManager,
                  final Provider<ClientSession> clientSessionProvider,
                  AppManagerService appManager
    ); void init(); List<String> readOnceProgress(); int getTotalProgress(); boolean isComplete();  }
@Test public void testRobinsonMorphology() { getLoader("test.data.path.morphology.robinson", "robinson_morphology.csv").loadRobinsonMorphology(); EntityDoc[] entities = getEntities(1, "morphology", "code", "V-2AAP-DSM"); EntityDoc e = entities[0]; assertEquals("Verb", e.get("function")); assertEquals("2nd Aorist", e.get("tense")); assertEquals("Active", e.get("voice")); assertEquals("Participle", e.get("mood")); assertEquals("Dative", e.get("case")); assertEquals("Singular", e.get("number")); assertEquals("Masculine", e.get("gender")); entities = getEntities(1, "morphology", "code", "F-1ASM"); e = entities[0]; assertEquals("1st", e.get("person")); assertEquals("Reflexive pronoun", e.get("function")); entities = getEntities(1, "morphology", "code", "F-1ASM"); e = entities[0]; assertEquals("1st", e.get("person")); assertEquals("Reflexive pronoun", e.get("function")); entities = getEntities(1, "morphology", "code", "D-NPM-C"); e = entities[0]; assertEquals("Contracted", e.get("suffix")); }