@Test public void testAdd() { Mockito.doNothing().when(chartofAccountQueueRepository).add(Mockito.any()); ChartOfAccountRequest request = new ChartOfAccountRequest(); request.setRequestInfo(getRequestInfo()); request.setChartOfAccounts(new ArrayList<ChartOfAccountContract>()); request.getChartOfAccounts().add(getChartOfAccountContract()); chartOfAccountRepository.add(request); Map<String, Object> message = new HashMap<>(); message.put("chartofaccount_create", request); Mockito.verify(chartofAccountQueueRepository).add(message); }
public void add(ChartOfAccountRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("chartofaccount_create", request); } else { message.put("chartofaccount_update", request); } chartOfAccountQueueRepository.add(message); }
ChartOfAccountRepository { public void add(ChartOfAccountRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("chartofaccount_create", request); } else { message.put("chartofaccount_update", request); } chartOfAccountQueueRepository.add(message); } }
ChartOfAccountRepository { public void add(ChartOfAccountRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("chartofaccount_create", request); } else { message.put("chartofaccount_update", request); } chartOfAccountQueueRepository.add(message); }  }
ChartOfAccountRepository { public void add(ChartOfAccountRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("chartofaccount_create", request); } else { message.put("chartofaccount_update", request); } chartOfAccountQueueRepository.add(message); }  ChartOfAccount findById(ChartOfAccount chartOfAccount); String getNextSequence(); @Transactional ChartOfAccount save(ChartOfAccount chartOfAccount); @Transactional ChartOfAccount update(ChartOfAccount chartOfAccount); void add(ChartOfAccountRequest request); Pagination<ChartOfAccount> search(ChartOfAccountSearch domain); boolean uniqueCheck(String fieldName, ChartOfAccount chartOfAccount); }
ChartOfAccountRepository { public void add(ChartOfAccountRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("chartofaccount_create", request); } else { message.put("chartofaccount_update", request); } chartOfAccountQueueRepository.add(message); }  ChartOfAccount findById(ChartOfAccount chartOfAccount); String getNextSequence(); @Transactional ChartOfAccount save(ChartOfAccount chartOfAccount); @Transactional ChartOfAccount update(ChartOfAccount chartOfAccount); void add(ChartOfAccountRequest request); Pagination<ChartOfAccount> search(ChartOfAccountSearch domain); boolean uniqueCheck(String fieldName, ChartOfAccount chartOfAccount);  }