@SuppressWarnings("unchecked") @Test public void getSubledgerDetailsTest() { final ChartOfAccountDetailContractResponse chartOfAccountContractResponse = getChartOfAccountDetailContractResponse(); when(restTemplate.postForObject(any(String.class), any(Object.class), any(Class.class))) .thenReturn(chartOfAccountContractResponse); voucherService.getSubledgerDetails(new RequestInfo(), "ap.kurnool", Long.valueOf("1224501")); }
public List<ChartOfAccountDetailContract> getSubledgerDetails(final RequestInfo requestInfo, final String tenantId, final Long accountId) { final String url = applicationProperties.getEgfMastersHost() + applicationProperties.getEgfServiceChartOfAccountsDetailsSearchPath() + "?tenantId=" + tenantId + "&chartOfAccount=" + accountId; log.debug("subledger details check URL :: " + url); log.debug("subledger details request info :: " + requestInfo); final ChartOfAccountDetailContractResponse coAccountDetailContractResponse = restTemplate.postForObject(url, requestInfo, ChartOfAccountDetailContractResponse.class); log.debug("subledger details response :: " + coAccountDetailContractResponse); return coAccountDetailContractResponse.getChartOfAccountDetails(); }
VoucherService { public List<ChartOfAccountDetailContract> getSubledgerDetails(final RequestInfo requestInfo, final String tenantId, final Long accountId) { final String url = applicationProperties.getEgfMastersHost() + applicationProperties.getEgfServiceChartOfAccountsDetailsSearchPath() + "?tenantId=" + tenantId + "&chartOfAccount=" + accountId; log.debug("subledger details check URL :: " + url); log.debug("subledger details request info :: " + requestInfo); final ChartOfAccountDetailContractResponse coAccountDetailContractResponse = restTemplate.postForObject(url, requestInfo, ChartOfAccountDetailContractResponse.class); log.debug("subledger details response :: " + coAccountDetailContractResponse); return coAccountDetailContractResponse.getChartOfAccountDetails(); } }
VoucherService { public List<ChartOfAccountDetailContract> getSubledgerDetails(final RequestInfo requestInfo, final String tenantId, final Long accountId) { final String url = applicationProperties.getEgfMastersHost() + applicationProperties.getEgfServiceChartOfAccountsDetailsSearchPath() + "?tenantId=" + tenantId + "&chartOfAccount=" + accountId; log.debug("subledger details check URL :: " + url); log.debug("subledger details request info :: " + requestInfo); final ChartOfAccountDetailContractResponse coAccountDetailContractResponse = restTemplate.postForObject(url, requestInfo, ChartOfAccountDetailContractResponse.class); log.debug("subledger details response :: " + coAccountDetailContractResponse); return coAccountDetailContractResponse.getChartOfAccountDetails(); }  }
VoucherService { public List<ChartOfAccountDetailContract> getSubledgerDetails(final RequestInfo requestInfo, final String tenantId, final Long accountId) { final String url = applicationProperties.getEgfMastersHost() + applicationProperties.getEgfServiceChartOfAccountsDetailsSearchPath() + "?tenantId=" + tenantId + "&chartOfAccount=" + accountId; log.debug("subledger details check URL :: " + url); log.debug("subledger details request info :: " + requestInfo); final ChartOfAccountDetailContractResponse coAccountDetailContractResponse = restTemplate.postForObject(url, requestInfo, ChartOfAccountDetailContractResponse.class); log.debug("subledger details response :: " + coAccountDetailContractResponse); return coAccountDetailContractResponse.getChartOfAccountDetails(); }  @SuppressWarnings({ "rawtypes", "unchecked" }) String createVoucher(final VoucherRequest voucherRequest, final String tenantId, final HttpHeaders headers); VoucherAccountCodeDetails getGlCodes(final RequestInfo requestInfo, final String tenantId,
            final Long accountId, final BigDecimal amount, final Boolean iscredit, final Boolean isDebit); List<ChartOfAccountContract> getChartOfAccounts(final RequestInfo requestInfo, final String tenantId,
            final Long accountId); List<ChartOfAccountDetailContract> getSubledgerDetails(final RequestInfo requestInfo, final String tenantId,
            final Long accountId); void validateSubLedgerDetails(final List<ChartOfAccountDetailContract> creditableCOA,
            final List<ChartOfAccountDetailContract> debitableCOA); VoucherRequest createRevaluationVoucherRequest(final Revaluation revaluation,
            final List<VoucherAccountCodeDetails> accountCodeDetails, final Long assetId, final Long departmentId,
            final HttpHeaders header); VoucherRequest createDisposalVoucherRequest(final Disposal disposal, final Long assetId,
            final Long departmentId, final List<VoucherAccountCodeDetails> accountCodeDetails,final String functionCode,
            final HttpHeaders header); VoucherRequest createDepreciationVoucherRequest(
            final List<DepreciationInputs> depreciationInputsList, final Long departmentId,final String functionCode,final Long assetId,
           final Long depreciationId,  final List<VoucherAccountCodeDetails> accountCodeDetails, final String tenantId, final HttpHeaders header); void setFinancialParameters(final Voucher voucher, final List<VoucherAccountCodeDetails> accountCodeDetails,
            final String tenantId,final String functionCode); }
VoucherService { public List<ChartOfAccountDetailContract> getSubledgerDetails(final RequestInfo requestInfo, final String tenantId, final Long accountId) { final String url = applicationProperties.getEgfMastersHost() + applicationProperties.getEgfServiceChartOfAccountsDetailsSearchPath() + "?tenantId=" + tenantId + "&chartOfAccount=" + accountId; log.debug("subledger details check URL :: " + url); log.debug("subledger details request info :: " + requestInfo); final ChartOfAccountDetailContractResponse coAccountDetailContractResponse = restTemplate.postForObject(url, requestInfo, ChartOfAccountDetailContractResponse.class); log.debug("subledger details response :: " + coAccountDetailContractResponse); return coAccountDetailContractResponse.getChartOfAccountDetails(); }  @SuppressWarnings({ "rawtypes", "unchecked" }) String createVoucher(final VoucherRequest voucherRequest, final String tenantId, final HttpHeaders headers); VoucherAccountCodeDetails getGlCodes(final RequestInfo requestInfo, final String tenantId,
            final Long accountId, final BigDecimal amount, final Boolean iscredit, final Boolean isDebit); List<ChartOfAccountContract> getChartOfAccounts(final RequestInfo requestInfo, final String tenantId,
            final Long accountId); List<ChartOfAccountDetailContract> getSubledgerDetails(final RequestInfo requestInfo, final String tenantId,
            final Long accountId); void validateSubLedgerDetails(final List<ChartOfAccountDetailContract> creditableCOA,
            final List<ChartOfAccountDetailContract> debitableCOA); VoucherRequest createRevaluationVoucherRequest(final Revaluation revaluation,
            final List<VoucherAccountCodeDetails> accountCodeDetails, final Long assetId, final Long departmentId,
            final HttpHeaders header); VoucherRequest createDisposalVoucherRequest(final Disposal disposal, final Long assetId,
            final Long departmentId, final List<VoucherAccountCodeDetails> accountCodeDetails,final String functionCode,
            final HttpHeaders header); VoucherRequest createDepreciationVoucherRequest(
            final List<DepreciationInputs> depreciationInputsList, final Long departmentId,final String functionCode,final Long assetId,
           final Long depreciationId,  final List<VoucherAccountCodeDetails> accountCodeDetails, final String tenantId, final HttpHeaders header); void setFinancialParameters(final Voucher voucher, final List<VoucherAccountCodeDetails> accountCodeDetails,
            final String tenantId,final String functionCode);  }