@Test public void getHistory() throws AecuException { when(historyUtil.getHistory(0, 1, resolver)).thenReturn(Arrays.asList(mock(HistoryEntry.class))); List<HistoryEntry> entries = service.getHistory(0, 1); assertEquals(1, entries.size()); }
@Override public List<HistoryEntry> getHistory(int startIndex, int count) throws AecuException { try (ResourceResolver resolver = resolverService.getServiceResourceResolver()) { return historyUtil.getHistory(startIndex, count, resolver); } catch (LoginException e) { throw new AecuException(ERR_NO_RESOLVER, e); } }
AecuServiceImpl implements AecuService { @Override public List<HistoryEntry> getHistory(int startIndex, int count) throws AecuException { try (ResourceResolver resolver = resolverService.getServiceResourceResolver()) { return historyUtil.getHistory(startIndex, count, resolver); } catch (LoginException e) { throw new AecuException(ERR_NO_RESOLVER, e); } } }
AecuServiceImpl implements AecuService { @Override public List<HistoryEntry> getHistory(int startIndex, int count) throws AecuException { try (ResourceResolver resolver = resolverService.getServiceResourceResolver()) { return historyUtil.getHistory(startIndex, count, resolver); } catch (LoginException e) { throw new AecuException(ERR_NO_RESOLVER, e); } }  }
AecuServiceImpl implements AecuService { @Override public List<HistoryEntry> getHistory(int startIndex, int count) throws AecuException { try (ResourceResolver resolver = resolverService.getServiceResourceResolver()) { return historyUtil.getHistory(startIndex, count, resolver); } 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 List<HistoryEntry> getHistory(int startIndex, int count) throws AecuException { try (ResourceResolver resolver = resolverService.getServiceResourceResolver()) { return historyUtil.getHistory(startIndex, count, resolver); } 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);  }