@Test
void builder() {

  String title = "A test title";
  Layout layout = Layout.builder().title(title).showLegend(true).build();
  Trace trace = ScatterTrace.builder(x, y).build();
  Figure figure = Figure.builder().layout(layout).addTraces(trace).build();
  assertEquals(layout, figure.getLayout());
  figure.asJavascript(divName); // force the context to get created
  assertTrue(String.valueOf(figure.getContext().get("figure")).contains(title));
}