### Question:
CryptoCompareClientService { public CryptoCompareResponseDTO getHistorical(CryptoCompareCurrency fromCurrency, List<CryptoCompareCurrency> toCurrency, long timeInSecond) throws Exception { CryptoCompareResponseDTO cryptoCompareResponseDTO = restTemplate.getForObject( getPriceHistoricalURI(fromCurrency, toCurrency, timeInSecond), CryptoCompareResponseDTO.class ); return cryptoCompareResponseDTO; } @Autowired  CryptoCompareClientService(@Qualifier("restTemplateCryptoCompare") RestTemplate restTemplate,
                                      CryptoCompareConfigHolder cryptoCompareConfigHolder); CryptoCompareResponseDTO getHistorical(CryptoCompareCurrency fromCurrency, List<CryptoCompareCurrency> toCurrency, long timeInSecond);  }### Answer:
@Test public void testGetHistorical() throws Exception { CryptoCompareConversionRateResponse rateResponseUSD = new CryptoCompareConversionRateResponse(CryptoCompareCurrency.USD, new BigDecimal(401.25)); CryptoCompareConversionRateResponse rateResponseBTC = new CryptoCompareConversionRateResponse(CryptoCompareCurrency.BTC, new BigDecimal(0.0056)); CryptoCompareConversionRates conversionRates = new CryptoCompareConversionRates(Arrays.asList(rateResponseUSD, rateResponseBTC)); List<CryptoCompareResponse> compareResponses = Arrays.asList(new CryptoCompareResponse(CryptoCompareCurrency.ETH, conversionRates)); CryptoCompareResponseDTO responseDTO = new CryptoCompareResponseDTO(compareResponses); when(restTemplate.getForObject(any(), eq(CryptoCompareResponseDTO.class))).thenReturn(responseDTO); CryptoCompareResponseDTO actualResponseDTO = cryptoCompareClientService.getHistorical( CryptoCompareCurrency.ETH, Arrays.asList(CryptoCompareCurrency.USD, CryptoCompareCurrency.BTC), Instant.now().getEpochSecond() ); assertEquals(actualResponseDTO, responseDTO); }