### Question:
StoreUpdater implements RdfProcessor { @Override public void start(int index) throws RdfProcessingFailedException { stopwatch = Stopwatch.createStarted(); currentversion = index; startTransactions(); logString = "Processed {} triples ({} triples/s)"; count = 0; } StoreUpdater(BdbTripleStore tripleStore, BdbTypeNameStore typeNameStore, BdbTruePatchStore truePatchStore,
                      UpdatedPerPatchStore updatedPerPatchStore, List<OptimizedPatchListener> listeners,
                      VersionStore versionStore, ImportStatus importStatus); @Override void setPrefix(String prefix, String iri); @Override void addRelation(String subject, String predicate, String object, String graph); @Override void addValue(String subject, String predicate, String value, String dataType, String graph); @Override void addLanguageTaggedString(String subject, String predicate, String value, String language,
                                      String graph); @Override void delRelation(String subject, String predicate, String object, String graph); @Override void delValue(String subject, String predicate, String value, String dataType, String graph); @Override void delLanguageTaggedString(String subject, String predicate, String value, String language,
                                      String graph); @Override void start(int index); @Override int getCurrentVersion(); @Override void commit();  }### Answer:
@Test public void startAddsProgressForThePrimaryStores() throws Exception { ImportStatus importStatus = mock(ImportStatus.class); StoreUpdater instance = createInstance(importStatus, Lists.newArrayList()); instance.start(0); verify(importStatus).addProgressItem(VersionStore.class.getSimpleName(), ImportStatusLabel.IMPORTING); verify(importStatus).addProgressItem(BdbTruePatchStore.class.getSimpleName(), ImportStatusLabel.IMPORTING); verify(importStatus).addProgressItem(BdbTripleStore.class.getSimpleName(), ImportStatusLabel.IMPORTING); verify(importStatus).addProgressItem(BdbTypeNameStore.class.getSimpleName(), ImportStatusLabel.IMPORTING); verify(importStatus).addProgressItem(UpdatedPerPatchStore.class.getSimpleName(), ImportStatusLabel.IMPORTING); }
@Test public void startAddsProgressForDerivedStores() throws Exception { ImportStatus importStatus = mock(ImportStatus.class); StoreUpdater instance = createInstance(importStatus, Lists.newArrayList(new DerivedStore1(), new DerivedStore2())); instance.start(0); verify(importStatus).addProgressItem(DerivedStore1.class.getSimpleName(), ImportStatusLabel.PENDING); verify(importStatus).addProgressItem(DerivedStore2.class.getSimpleName(), ImportStatusLabel.PENDING); }
@Test public void onceEvery5SecondesTheStoreProgressItemsAreUpdated() throws Exception { ImportStatus importStatus = mock(ImportStatus.class); StoreUpdater instance = createInstance(importStatus, Lists.newArrayList()); instance.start(0); instance.onQuad(true, "", "", "", "", "", ""); Thread.sleep(6000); instance.onQuad(true, "", "", "", "", "", ""); verify(importStatus).updateProgressItem(VersionStore.class.getSimpleName(), 2); verify(importStatus).updateProgressItem(BdbTruePatchStore.class.getSimpleName(), 2); verify(importStatus).updateProgressItem(BdbTripleStore.class.getSimpleName(), 2); verify(importStatus).updateProgressItem(BdbTypeNameStore.class.getSimpleName(), 2); verify(importStatus).updateProgressItem(UpdatedPerPatchStore.class.getSimpleName(), 2); }