public Object select(String id, ParamOption[] options, Object defaultValue) {
    if (defaultValue == null && options != null && options.length > 0) {
      defaultValue = options[0].getValue();
    }
    forms.put(id, new Select(id, defaultValue, options));
    Object value = params.get(id);
    if (value == null) {
      value = defaultValue;
    }
    params.put(id, value);
    return value;
  }
@Test
  void testSelect() {
    GUI gui = new GUI();
    Object selected = gui.select("list_1", options, null);
    // use the first one as the default value
    assertEquals("1", selected);

    gui = new GUI();
    selected = gui.select("list_1", options,  "2");
    assertEquals("2", selected);
    // "2" is selected by above statement, so even this default value is "1", the selected value is
    // still "2"
    selected = gui.select("list_1", options, "1");
    assertEquals("2", selected);
  }