@Test public void testUpdateWithOutKafka() { List<Bank> expectedResult = getBanks(); BankEntity entity = new BankEntity().toEntity(expectedResult.get(0)); when(bankJdbcRepository.update(any(BankEntity.class))).thenReturn(entity); bankRepositoryWithOutKafka.update(expectedResult, requestInfo); verify(bankQueueRepository).addToSearch(any(Map.class)); }
@Transactional public Bank update(Bank bank) { BankEntity entity = bankJdbcRepository.update(new BankEntity().toEntity(bank)); return entity.toDomain(); }
BankRepository { @Transactional public Bank update(Bank bank) { BankEntity entity = bankJdbcRepository.update(new BankEntity().toEntity(bank)); return entity.toDomain(); } }
BankRepository { @Transactional public Bank update(Bank bank) { BankEntity entity = bankJdbcRepository.update(new BankEntity().toEntity(bank)); return entity.toDomain(); } @Autowired  BankRepository(BankJdbcRepository bankJdbcRepository, MastersQueueRepository bankQueueRepository,
			FinancialConfigurationService financialConfigurationService, BankESRepository bankESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); }
BankRepository { @Transactional public Bank update(Bank bank) { BankEntity entity = bankJdbcRepository.update(new BankEntity().toEntity(bank)); return entity.toDomain(); } @Autowired  BankRepository(BankJdbcRepository bankJdbcRepository, MastersQueueRepository bankQueueRepository,
			FinancialConfigurationService financialConfigurationService, BankESRepository bankESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); Bank findById(Bank bank); String getNextSequence(); @Transactional Bank save(Bank bank); @Transactional Bank update(Bank bank); void add(BankRequest request); Pagination<Bank> search(BankSearch domain); @Transactional List<Bank> save(List<Bank> banks, RequestInfo requestInfo); @Transactional List<Bank> update(List<Bank> banks, RequestInfo requestInfo); void addToQue(BankRequest request); void addToSearchQueue(BankRequest request); boolean uniqueCheck(String fieldName, Bank bank); }
BankRepository { @Transactional public Bank update(Bank bank) { BankEntity entity = bankJdbcRepository.update(new BankEntity().toEntity(bank)); return entity.toDomain(); } @Autowired  BankRepository(BankJdbcRepository bankJdbcRepository, MastersQueueRepository bankQueueRepository,
			FinancialConfigurationService financialConfigurationService, BankESRepository bankESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); Bank findById(Bank bank); String getNextSequence(); @Transactional Bank save(Bank bank); @Transactional Bank update(Bank bank); void add(BankRequest request); Pagination<Bank> search(BankSearch domain); @Transactional List<Bank> save(List<Bank> banks, RequestInfo requestInfo); @Transactional List<Bank> update(List<Bank> banks, RequestInfo requestInfo); void addToQue(BankRequest request); void addToSearchQueue(BankRequest request); boolean uniqueCheck(String fieldName, Bank bank);  }