### Question:
MaterialOptionHelper extends AbstractOptionHelper { @Override public ChartOptions addDualAxisOptions(ChartOptions parent, String[] axisNames, String[] seriesMapping, String[] axisTitles, OptionModifier[] axisModifiers, OptionModifier[] seriesModifiers) { ChartOptions axesOpt = new ChartOptions(); ChartOptions yOpt = new ChartOptions(); int axNo = 0; for (String axisName : axisNames) { ChartOptions lblOpt = new ChartOptions(); lblOpt.put("label", axisTitles[axNo++]); yOpt.put(axisName, lblOpt); if (axisModifiers != null && axisModifiers[axNo] != null) { axisModifiers[axNo].modify(yOpt); } } axesOpt.put("y", yOpt); parent.put("axes", axesOpt); ChartOptions seriesOpt = new ChartOptions(); int i = 0; for (String seriesMap : seriesMapping) { ChartOptions mapOpt = new ChartOptions(); mapOpt.put("axis", seriesMap); if (seriesModifiers != null && seriesModifiers[i] != null) { seriesModifiers[i].modify(seriesOpt); } seriesOpt.put(String.valueOf(i++), mapOpt); } parent.put("series", seriesOpt); return parent; } MaterialOptionHelper(Chart chart); @Override ChartOptions addTitle(ChartOptions parent, String title); @Override ChartOptions addTitle(ChartOptions parent, IModel<String> titleModel); @Override ChartOptions addSubTitle(ChartOptions parent, String subTitle); @Override ChartOptions addSubTitle(ChartOptions parent, IModel<String> subTitleModel); @Override ChartOptions addDualAxisOptions(ChartOptions parent,
            String[] axisNames, String[] seriesMapping, String[] axisTitles,
            OptionModifier[] axisModifiers, OptionModifier[] seriesModifiers);  }### Answer:
@Test public void testAddDualAxisOptions() { ChartOptions parent = new ChartOptions(); MaterialOptionHelper instance = new MaterialOptionHelper(chart); String[] axisNames = {"Temp", "Humidity"}; String[] seriesMapping = {"Temp", "Temp", "Humidity"}; String[] axisTitles = {"Temperatur", "Feuchtigkeit"}; String expResult = "{\"series\":{\"0\":{\"axis\":\"Temp\"},\"1\":{\"axis\":\"Temp\"},\"2\":{\"axis\":\"Humidity\"}},\"axes\":{\"y\":{\"Temp\":{\"label\":\"Temperatur\"},\"Humidity\":{\"label\":\"Feuchtigkeit\"}}}}"; ChartOptions result = instance.addDualAxisOptions(parent, axisNames, seriesMapping, axisTitles); assertJsonEquals(expResult, result.toJSON().toString()); }