### Question:
Reuters { static MarketIndex toMarketIndex(String symbol, Document document) { String name = parseName(document); String text = document .select("#headerQuoteContainer .sectionQuote .label:contains(Price)") .first() .parent() .select(".dataHeader") .text(); LOG.info("[toMarketIndex] lastPrice: {}", text); BigDecimal lastPrice = BigDecimalParser.parse(text); text = document .select("#headerQuoteContainer .sectionQuote .label:contains(Today's Change)") .first() .parent() .select(".dataParenthetical") .text(); text = text.substring(0, text.length() -2); text = text.substring(1); BigDecimal percVariation = BigDecimalParser.parse(text); text = document.select(".indexInfo .dataTable .label:matches(.*Day's Low.*)") .last() .parent() .select(".data") .text(); LOG.info("[toMarketIndex] min: {}", text); BigDecimal min = BigDecimalParser.parse(text); text = document.select(".indexInfo .dataTable .label:matches(.*Day's Low.*)") .first() .parent() .select(".data") .text(); LOG.info("[toMarketIndex] min: {}", text); BigDecimal max = BigDecimalParser.parse(text); return new MarketIndex(symbol, name, lastPrice, percVariation, null , min, max ); } Reuters(); Stream<String> symbols(); MarketIndex marketIndex(String symbol);  }### Answer:
@Test public void create_market_index() throws IOException { Document document = Jsoup.parse(Reuters.class.getResourceAsStream("/reuters/dji-sample-page.html"), "UTF-8", "http: MarketIndex marketIndex = Reuters.toMarketIndex(".DJI", document); System.out.println(marketIndex); assertEquals("Dow Jones Industrial Average", marketIndex.getName()); assertEquals(new BigDecimal("18240.49"), marketIndex.getLastPrice()); assertEquals(new BigDecimal("-0.15"), marketIndex.getPercVariation()); assertEquals(new BigDecimal("18149.30"), marketIndex.getMin()); assertEquals(new BigDecimal("18319.70"), marketIndex.getMax()); }