### Question:
InvestorService { public Investor fetchInvestorById(String investorId) { return investorsList.stream().filter(investors -> investorId.equalsIgnoreCase(investors.getId())).findAny() .orElse(null); }  List<Investor> fetchAllInvestors(); Investor fetchInvestorById(String investorId); List<Stock> fetchStocksByInvestorId(String investorId, int offset, int limit); Stock fetchSingleStockByInvestorIdAndStockSymbol(String investorId, String symbol); @HystrixCommand(fallbackMethod="welcomeUrlFailureFallback") String circuitBreakerImplWelcome(); String welcomeUrlFailureFallback();  }### Answer:
@Test public void testFetchInvestorById() { Investor actualInvestor = getInvestorServiceForTest().fetchInvestorById("invr_1"); Investor expectedInvestor = new Investor("INVR_1", "Investor ONE", "conservative investor", getStocksSetOne()); assertEquals(actualInvestor.getId(), expectedInvestor.getId()); actualInvestor = getInvestorServiceForTest().fetchInvestorById("invr_2"); expectedInvestor = new Investor("INVR_2", "Investor TWO", "Moderate Risk investor", getStocksSetTwo()); assertEquals(expectedInvestor.getId(), actualInvestor.getId()); }