AecuServiceImpl implements AecuService { @Override public HistoryEntry finishHistoryEntry(HistoryEntry history) throws AecuException { try (ResourceResolver resolver = resolverService.getServiceResourceResolver()) { historyUtil.finishHistoryEntry(history, resolver); resolver.commit(); return history; } catch (LoginException e) { throw new AecuException(ERR_NO_RESOLVER, e); } catch (PersistenceException e) { throw new AecuException("Unable to finish history " + history.getRepositoryPath(), e); } }  @Override String getVersion(); @Override List<String> getFiles(String path); @Override boolean matchesRunmodes(String name); @Override boolean isValidScriptName(String name); @Override ExecutionResult execute(String path); @Override HistoryEntry createHistoryEntry(); @Override HistoryEntry finishHistoryEntry(HistoryEntry history); @Override HistoryEntry storeExecutionInHistory(HistoryEntry history, ExecutionResult result); @Override List<HistoryEntry> getHistory(int startIndex, int count);  }
@Test public void finishHistoryEntry() throws AecuException { HistoryEntryImpl history = new HistoryEntryImpl(); history.setState(STATE.RUNNING); service.finishHistoryEntry(history); verify(historyUtil, times(1)).finishHistoryEntry(history, resolver); }