### Question:
ClassicOptionBuilder extends OptionBuilder { @Override public ChartOptions build() { ChartOptions options = new ChartOptions(); if (titleModel != null) { options.put("title", titleModel); } HashMap<String, Integer> axisNoMap = new HashMap<>(); ChartOptions vAxes = new ChartOptions(); int axNo = 0; for (Map.Entry<String, IModel<String>> entry : axisMap.entrySet()) { axisNoMap.put(entry.getKey(), axNo); final ChartOptions axisOpt = new ChartOptions(); axisOpt.put("title", entry.getValue()); if (axisModifierMap.containsKey(entry.getKey())) { axisModifierMap.get(entry.getKey()).modify(axisOpt); } vAxes.put(String.valueOf(axNo++), axisOpt); } if (!vAxes.isEmpty()) { options.put("vAxes", vAxes); } int serNo = 0; ChartOptions seriesOpts = new ChartOptions(); for (SeriesDeclaration ser : series) { ChartOptions mapOpt = new ChartOptions(); mapOpt.put("targetAxisIndex", axisNoMap.get(ser.getAxisName())); if (ser.hasModifier()) { ser.getModifier().modify(mapOpt); } seriesOpts.put(String.valueOf(serNo++), mapOpt); } if (!seriesOpts.isEmpty()) { options.put("series", seriesOpts); } return options; } ClassicOptionBuilder(Chart chart); @Override ChartOptions build();  }### Answer:
@Test public void testBuild() { ClassicOptionBuilder builder = OptionBuilder.classic(chart); builder.title("My first Chart"); ChartOptions expResult = new ChartOptions(); expResult.put("title", "My first Chart"); ChartOptions result = builder.build(); assertNotEquals(expResult, result); assertJsonEquals(expResult.toJSON().toString(), result.toJSON().toString()); builder.axis("TEMP", "Temps (Celsius)").axis("DAYLIGHT", "Daylight"); builder.modifyAxis("TEMP", new OptionModifier() { @Override public void modify(ChartOptions options) { ChartOptions textStyle = new ChartOptions(); textStyle.put("color", "red"); options.put("textStyle", textStyle); } }); builder.mapSeries("TEMP").mapSeries("DAYLIGHT", new OptionModifier() { @Override public void modify(ChartOptions options) { options.put("color", "yellow"); } }); result = builder.build(); assertJsonEquals("{\"vAxes\":{\"0\":{\"textStyle\":{\"color\":\"red\"},\"title\":\"Temps (Celsius)\"},\"1\":{\"title\":\"Daylight\"}},\"series\":{\"0\":{\"targetAxisIndex\":0},\"1\":{\"color\":\"yellow\",\"targetAxisIndex\":1}},\"title\":\"My first Chart\"}", result.toJSON().toString()); }