@Test public void testUpdatee() { AccountCodePurposeEntity accountCodePurposeEntity = getAccountCodePurposeEntity(); AccountCodePurpose expectedResult = accountCodePurposeEntity.toDomain(); when(accountCodePurposeJdbcRepository.update(any(AccountCodePurposeEntity.class))) .thenReturn(accountCodePurposeEntity); AccountCodePurpose actualResult = accountCodePurposeRepository.update(getAccountCodePurposeDomain()); assertEquals(expectedResult, actualResult); }
@Transactional public AccountCodePurpose update(AccountCodePurpose accountCodePurpose) { AccountCodePurposeEntity entity = accountCodePurposeJdbcRepository .update(new AccountCodePurposeEntity().toEntity(accountCodePurpose)); return entity.toDomain(); }
AccountCodePurposeRepository { @Transactional public AccountCodePurpose update(AccountCodePurpose accountCodePurpose) { AccountCodePurposeEntity entity = accountCodePurposeJdbcRepository .update(new AccountCodePurposeEntity().toEntity(accountCodePurpose)); return entity.toDomain(); } }
AccountCodePurposeRepository { @Transactional public AccountCodePurpose update(AccountCodePurpose accountCodePurpose) { AccountCodePurposeEntity entity = accountCodePurposeJdbcRepository .update(new AccountCodePurposeEntity().toEntity(accountCodePurpose)); return entity.toDomain(); } @Autowired  AccountCodePurposeRepository(AccountCodePurposeJdbcRepository accountCodePurposeJdbcRepository,
			MastersQueueRepository accountCodePurposeQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountCodePurposeESRepository accountCodePurposeESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); }
AccountCodePurposeRepository { @Transactional public AccountCodePurpose update(AccountCodePurpose accountCodePurpose) { AccountCodePurposeEntity entity = accountCodePurposeJdbcRepository .update(new AccountCodePurposeEntity().toEntity(accountCodePurpose)); return entity.toDomain(); } @Autowired  AccountCodePurposeRepository(AccountCodePurposeJdbcRepository accountCodePurposeJdbcRepository,
			MastersQueueRepository accountCodePurposeQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountCodePurposeESRepository accountCodePurposeESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); AccountCodePurpose findById(AccountCodePurpose accountCodePurpose); String getNextSequence(); @Transactional AccountCodePurpose save(AccountCodePurpose accountCodePurpose); @Transactional AccountCodePurpose update(AccountCodePurpose accountCodePurpose); @Transactional List<AccountCodePurpose> save(List<AccountCodePurpose> accountCodePurposes, RequestInfo requestInfo); @Transactional List<AccountCodePurpose> update(List<AccountCodePurpose> accountCodePurposes, RequestInfo requestInfo); void add(AccountCodePurposeRequest request); Pagination<AccountCodePurpose> search(AccountCodePurposeSearch domain); void uniqueCheck(AccountCodePurpose accountCodePurpose); Boolean uniqueCheck(String fieldName, AccountCodePurpose accountCodePurpose); void addToQue(AccountCodePurposeRequest request); void addToSearchQueue(AccountCodePurposeRequest request); }
AccountCodePurposeRepository { @Transactional public AccountCodePurpose update(AccountCodePurpose accountCodePurpose) { AccountCodePurposeEntity entity = accountCodePurposeJdbcRepository .update(new AccountCodePurposeEntity().toEntity(accountCodePurpose)); return entity.toDomain(); } @Autowired  AccountCodePurposeRepository(AccountCodePurposeJdbcRepository accountCodePurposeJdbcRepository,
			MastersQueueRepository accountCodePurposeQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountCodePurposeESRepository accountCodePurposeESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); AccountCodePurpose findById(AccountCodePurpose accountCodePurpose); String getNextSequence(); @Transactional AccountCodePurpose save(AccountCodePurpose accountCodePurpose); @Transactional AccountCodePurpose update(AccountCodePurpose accountCodePurpose); @Transactional List<AccountCodePurpose> save(List<AccountCodePurpose> accountCodePurposes, RequestInfo requestInfo); @Transactional List<AccountCodePurpose> update(List<AccountCodePurpose> accountCodePurposes, RequestInfo requestInfo); void add(AccountCodePurposeRequest request); Pagination<AccountCodePurpose> search(AccountCodePurposeSearch domain); void uniqueCheck(AccountCodePurpose accountCodePurpose); Boolean uniqueCheck(String fieldName, AccountCodePurpose accountCodePurpose); void addToQue(AccountCodePurposeRequest request); void addToSearchQueue(AccountCodePurposeRequest request);  }