@Test public void testRead() { historyService.findHistory("any", "any", null); verify(mockHistoryCrudService).findHistory(eq("any"), eq("any"), anyInt()); }
@Override @Transactional(readOnly = true) public List<JpaHistory> findHistory(final String groupName, final String serverName, final Integer numOfRec) { return historyCrudService.findHistory(groupName, serverName, numOfRec); }
HistoryServiceImpl implements HistoryService { @Override @Transactional(readOnly = true) public List<JpaHistory> findHistory(final String groupName, final String serverName, final Integer numOfRec) { return historyCrudService.findHistory(groupName, serverName, numOfRec); } }
HistoryServiceImpl implements HistoryService { @Override @Transactional(readOnly = true) public List<JpaHistory> findHistory(final String groupName, final String serverName, final Integer numOfRec) { return historyCrudService.findHistory(groupName, serverName, numOfRec); } @Autowired  HistoryServiceImpl(final HistoryCrudService historyCrudService); }
HistoryServiceImpl implements HistoryService { @Override @Transactional(readOnly = true) public List<JpaHistory> findHistory(final String groupName, final String serverName, final Integer numOfRec) { return historyCrudService.findHistory(groupName, serverName, numOfRec); } @Autowired  HistoryServiceImpl(final HistoryCrudService historyCrudService); @Override @Transactional(propagation = Propagation.REQUIRES_NEW) // Write history independent of any transaction. List<JpaHistory> createHistory(final String serverName, final List<Group> groups, final String event,
                                          final EventType eventType, final String user); @Override @Transactional(readOnly = true) List<JpaHistory> findHistory(final String groupName, final String serverName, final Integer numOfRec); }
HistoryServiceImpl implements HistoryService { @Override @Transactional(readOnly = true) public List<JpaHistory> findHistory(final String groupName, final String serverName, final Integer numOfRec) { return historyCrudService.findHistory(groupName, serverName, numOfRec); } @Autowired  HistoryServiceImpl(final HistoryCrudService historyCrudService); @Override @Transactional(propagation = Propagation.REQUIRES_NEW) // Write history independent of any transaction. List<JpaHistory> createHistory(final String serverName, final List<Group> groups, final String event,
                                          final EventType eventType, final String user); @Override @Transactional(readOnly = true) List<JpaHistory> findHistory(final String groupName, final String serverName, final Integer numOfRec);  }