@Test
  public void testScanRequestWithROI() throws Exception {

    BoundingBox bbox = new BoundingBox();
    bbox.setFastAxisStart(0);
    bbox.setSlowAxisStart(1);
    bbox.setFastAxisLength(10);
    bbox.setSlowAxisLength(11);

    GridModel gmodel = new GridModel();
    gmodel.setFastAxisName("myFast");
    gmodel.setSlowAxisName("mySlow");
    gmodel.setBoundingBox(bbox);
    gmodel.setFastAxisPoints(3);
    gmodel.setSlowAxisPoints(4);

    CircularROI croi = new CircularROI();
    ScanRequest<IROI> request = new ScanRequest<>();

    CompoundModel cmodel = new CompoundModel();
    cmodel.setData(gmodel, croi);
    request.setCompoundModel(cmodel);

    assertEquals( // Concise.
        "mscan(grid(('myFast', 'mySlow'), (0.0, 1.0), (10.0, 12.0), count=(3, 4), snake=False, roi=circ((0.0, 0.0), 1.0)))",
        pyExpress(request, false));
    assertEquals( // Verbose.
        "mscan(path=[grid(axes=('myFast', 'mySlow'), start=(0.0, 1.0), stop=(10.0, 12.0), count=(3, 4), snake=False, roi=[circ(origin=(0.0, 0.0), radius=1.0)])])",
        pyExpress(request, true));
  }
  @Test
  public void testGridModel() throws PyExpressionNotImplementedException {

    BoundingBox bbox = new BoundingBox();
    bbox.setFastAxisStart(0);
    bbox.setSlowAxisStart(1);
    bbox.setFastAxisLength(10);
    bbox.setSlowAxisLength(11);

    GridModel gmodel = new GridModel();
    gmodel.setFastAxisName("myFast");
    gmodel.setSlowAxisName("mySlow");
    gmodel.setBoundingBox(bbox);
    gmodel.setFastAxisPoints(3);
    gmodel.setSlowAxisPoints(4);

    assertEquals( // Concise.
        "grid(('myFast', 'mySlow'), (0.0, 1.0), (10.0, 12.0), count=(3, 4), snake=False)",
        pyExpress(gmodel, new ArrayList<>(), false));
    assertEquals( // Verbose.
        "grid(axes=('myFast', 'mySlow'), start=(0.0, 1.0), stop=(10.0, 12.0), count=(3, 4), snake=False)",
        pyExpress(gmodel, new ArrayList<>(), true));
  }
  @Test
  public void testRasterModel() throws PyExpressionNotImplementedException {

    BoundingBox bbox = new BoundingBox();
    bbox.setFastAxisStart(0);
    bbox.setSlowAxisStart(1);
    bbox.setFastAxisLength(10);
    bbox.setSlowAxisLength(11);

    RasterModel rmodel = new RasterModel();
    rmodel.setFastAxisName("myFast");
    rmodel.setSlowAxisName("mySlow");
    rmodel.setBoundingBox(bbox);
    rmodel.setFastAxisStep(3);
    rmodel.setSlowAxisStep(4);
    rmodel.setSnake(true);

    assertEquals( // Concise.
        "grid(('myFast', 'mySlow'), (0.0, 1.0), (10.0, 12.0), (3.0, 4.0))",
        pyExpress(rmodel, null, false));
    assertEquals( // Verbose.
        "grid(axes=('myFast', 'mySlow'), start=(0.0, 1.0), stop=(10.0, 12.0), step=(3.0, 4.0), snake=True)",
        pyExpress(rmodel, null, true));
  }