ApiGateway { @RequestMapping("/mobile") public MobileProduct getProductMobile() { MobileProduct mobileProduct = new MobileProduct(); mobileProduct.setPrice(priceClient.getPrice()); return mobileProduct; }  @RequestMapping("/desktop") DesktopProduct getProductDesktop(); @RequestMapping("/mobile") MobileProduct getProductMobile();  }
@Test public void testGetProductMobile() { String price = "20"; when(priceClient.getPrice()).thenReturn(price); MobileProduct mobileProduct = apiGateway.getProductMobile(); assertEquals(price, mobileProduct.getPrice()); }