@Test
  public void testVSetWithColorMap() throws IOException {
    URL url = this.getClass().getResource("vset.vs");
    InputStream is = url.openStream();

    GocadReaderParameters parameters = new GocadReaderParameters();
    ColorMap colorMap = new ColorMap();
    colorMap.setValuesPercentages(true);
    colorMap.put(0d, Color.BLACK);
    colorMap.put(1d, Color.WHITE);
    parameters.setColorMap(colorMap);

    List<FastShape> shapes = GocadFactory.read(is, url, parameters);

    assertEquals(1, shapes.size());

    FastShape shape = shapes.get(0);
    assertNotNull(shape.getColorBuffer());
    assertEquals(20 * 4, shape.getColorBuffer().length);
  }
  @Test
  public void testVSetWithParameterOverrides() throws IOException {
    URL url = this.getClass().getResource("vset.vs");
    InputStream is = url.openStream();

    GocadReaderParameters parameters = new GocadReaderParameters();
    parameters.setColor(Color.RED);
    parameters.setPointSize(4.0);

    List<FastShape> shapes = GocadFactory.read(is, url, parameters);

    assertEquals(1, shapes.size());

    FastShape shape = shapes.get(0);
    assertEquals(20, shape.getPositions().size());
    assertEquals(GL.GL_POINTS, shape.getMode());
    assertFalse(shape.isLighted());
    assertEquals(4.0, shape.getPointSize(), 0.001);
    assertEquals(Color.RED, shape.getColor());
    assertNull(shape.getColorBuffer());
  }