@Test public void testSave() { BankAccountEntity bankAccountEntity = getBankAccountEntity(); BankAccount expectedResult = bankAccountEntity.toDomain(); when(bankAccountJdbcRepository.create(any(BankAccountEntity.class))).thenReturn(bankAccountEntity); BankAccount actualResult = bankAccountRepository.save(getBankAccountDomain()); assertEquals(expectedResult.getId(), actualResult.getId()); }
@Transactional public BankAccount save(BankAccount bankAccount) { BankAccountEntity entity = bankAccountJdbcRepository.create(new BankAccountEntity().toEntity(bankAccount)); return entity.toDomain(); }
BankAccountRepository { @Transactional public BankAccount save(BankAccount bankAccount) { BankAccountEntity entity = bankAccountJdbcRepository.create(new BankAccountEntity().toEntity(bankAccount)); return entity.toDomain(); } }
BankAccountRepository { @Transactional public BankAccount save(BankAccount bankAccount) { BankAccountEntity entity = bankAccountJdbcRepository.create(new BankAccountEntity().toEntity(bankAccount)); return entity.toDomain(); } @Autowired  BankAccountRepository(BankAccountJdbcRepository bankAccountJdbcRepository,
			MastersQueueRepository bankAccountQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			BankAccountESRepository bankAccountESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); }
BankAccountRepository { @Transactional public BankAccount save(BankAccount bankAccount) { BankAccountEntity entity = bankAccountJdbcRepository.create(new BankAccountEntity().toEntity(bankAccount)); return entity.toDomain(); } @Autowired  BankAccountRepository(BankAccountJdbcRepository bankAccountJdbcRepository,
			MastersQueueRepository bankAccountQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			BankAccountESRepository bankAccountESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); BankAccount findById(BankAccount bankAccount); String getNextSequence(); @Transactional BankAccount save(BankAccount bankAccount); @Transactional BankAccount update(BankAccount bankAccount); boolean uniqueCheck(String fieldName, BankAccount bankAccount); void add(BankAccountRequest request); Pagination<BankAccount> search(BankAccountSearch domain); @Transactional List<BankAccount> save(List<BankAccount> bankAccounts, RequestInfo requestInfo); @Transactional List<BankAccount> update(List<BankAccount> bankAccounts, RequestInfo requestInfo); void addToQue(BankAccountRequest request); void addToSearchQueue(BankAccountRequest request); }
BankAccountRepository { @Transactional public BankAccount save(BankAccount bankAccount) { BankAccountEntity entity = bankAccountJdbcRepository.create(new BankAccountEntity().toEntity(bankAccount)); return entity.toDomain(); } @Autowired  BankAccountRepository(BankAccountJdbcRepository bankAccountJdbcRepository,
			MastersQueueRepository bankAccountQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			BankAccountESRepository bankAccountESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); BankAccount findById(BankAccount bankAccount); String getNextSequence(); @Transactional BankAccount save(BankAccount bankAccount); @Transactional BankAccount update(BankAccount bankAccount); boolean uniqueCheck(String fieldName, BankAccount bankAccount); void add(BankAccountRequest request); Pagination<BankAccount> search(BankAccountSearch domain); @Transactional List<BankAccount> save(List<BankAccount> bankAccounts, RequestInfo requestInfo); @Transactional List<BankAccount> update(List<BankAccount> bankAccounts, RequestInfo requestInfo); void addToQue(BankAccountRequest request); void addToSearchQueue(BankAccountRequest request);  }