### Question:
MarketMaker implements Runnable { @VisibleForTesting StockPrice createStockPrice() { double price = createPrice(); DecimalFormat df = new DecimalFormat("#.##"); BigDecimal bid = new BigDecimal(df.format(price - variance(price))); BigDecimal ask = new BigDecimal(df.format(price + variance(price))); StockPrice stockPrice = new StockPrice(bid, ask, stockCode, description, System.currentTimeMillis()); return stockPrice; } MarketMaker(String topicName, String stockCode, String description); void publishPrices(); @Override void run(); void stop(); static void main(String[] args);  }### Answer:
@Test public void testCreateStockPrice() { StockPrice result = instance.createStockPrice(); assertEquals(CODE, result.getCode()); assertEquals(DESCRIPTION, result.getDescription()); BigDecimal ask = result.getAsk(); assertTrue(ask.doubleValue() <= 20.10); assertTrue(ask.doubleValue() >= 15.20); BigDecimal bid = result.getBid(); assertTrue(bid.doubleValue() <= 20.10); assertTrue(bid.doubleValue() >= 15.20); assertTrue(bid.doubleValue() < ask.doubleValue()); }