@Test public void createHistoryEntry() throws AecuException { service.createHistoryEntry(); verify(historyUtil, times(1)).createHistoryEntry(resolver); }
@Override public HistoryEntry createHistoryEntry() throws AecuException { try (ResourceResolver resolver = resolverService.getServiceResourceResolver()) { HistoryEntry entry = historyUtil.createHistoryEntry(resolver); resolver.commit(); return entry; } catch (PersistenceException e) { throw new AecuException("Unable to create history", e); } catch (LoginException e) { throw new AecuException(ERR_NO_RESOLVER, e); } }
AecuServiceImpl implements AecuService { @Override public HistoryEntry createHistoryEntry() throws AecuException { try (ResourceResolver resolver = resolverService.getServiceResourceResolver()) { HistoryEntry entry = historyUtil.createHistoryEntry(resolver); resolver.commit(); return entry; } catch (PersistenceException e) { throw new AecuException("Unable to create history", e); } catch (LoginException e) { throw new AecuException(ERR_NO_RESOLVER, e); } } }
AecuServiceImpl implements AecuService { @Override public HistoryEntry createHistoryEntry() throws AecuException { try (ResourceResolver resolver = resolverService.getServiceResourceResolver()) { HistoryEntry entry = historyUtil.createHistoryEntry(resolver); resolver.commit(); return entry; } catch (PersistenceException e) { throw new AecuException("Unable to create history", e); } catch (LoginException e) { throw new AecuException(ERR_NO_RESOLVER, e); } }  }
AecuServiceImpl implements AecuService { @Override public HistoryEntry createHistoryEntry() throws AecuException { try (ResourceResolver resolver = resolverService.getServiceResourceResolver()) { HistoryEntry entry = historyUtil.createHistoryEntry(resolver); resolver.commit(); return entry; } catch (PersistenceException e) { throw new AecuException("Unable to create history", e); } catch (LoginException e) { throw new AecuException(ERR_NO_RESOLVER, 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); }
AecuServiceImpl implements AecuService { @Override public HistoryEntry createHistoryEntry() throws AecuException { try (ResourceResolver resolver = resolverService.getServiceResourceResolver()) { HistoryEntry entry = historyUtil.createHistoryEntry(resolver); resolver.commit(); return entry; } catch (PersistenceException e) { throw new AecuException("Unable to create history", e); } catch (LoginException e) { throw new AecuException(ERR_NO_RESOLVER, 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);  }