private void setNonCustomValue(String value, int times) {
    comboBox.view.listBoxGotFocus();
    comboBox.listBoxValueChanged(value);
    assertEquals(listBox.isVisible(), true);
    assertEquals(textBox.isVisible(), false);

    verify(modelPresenter, times(times)).setListBoxModelValue(listBox, value);
    assertEquals(comboBox.getValue(), value);
  }
  private void setCustomValue(String value) {
    comboBox.view.listBoxGotFocus();
    comboBox.listBoxValueChanged(this.customPrompt);
    assertEquals(listBox.isVisible(), false);
    assertEquals(textBox.isVisible(), true);

    comboBox.view.textBoxGotFocus();
    textBox.setValue(value);
    comboBox.view.textBoxLostFocus();
    comboBox.view.listBoxGotFocus();
    assertEquals(listBox.isVisible(), true);
    assertEquals(textBox.isVisible(), false);

    String listBoxValue = this.quoteStringValues ? StringUtils.createQuotedConstant(value) : value;
    verify(modelPresenter).setTextBoxModelValue(textBox, listBoxValue);
    assertEquals(comboBox.getValue(), listBoxValue);
  }
  private void aboutToEditCustomValue(String value, int times) {
    comboBox.view.listBoxGotFocus();
    comboBox.listBoxValueChanged(this.editPrefix + value + this.editSuffix);
    assertEquals(listBox.isVisible(), false);
    assertEquals(textBox.isVisible(), true);

    verify(modelPresenter, times(times)).setTextBoxModelValue(textBox, value);
    assertEquals(textBox.getValue(), value);
  }
  private void initComboBoxTest(
      boolean quoteStringValues,
      String customPrompt,
      String placeholder,
      String editPrefix,
      String editSuffix,
      List<String> listBoxStartValues) {
    initPresenter();
    initListBox();
    initTextBox();

    ListBoxValues listBoxValues = new ListBoxValues(customPrompt, editPrefix, null);
    listBoxValues.addValues(listBoxStartValues);

    comboBox.view = view;
    comboBox.init(modelPresenter, listBox, textBox, quoteStringValues, customPrompt, placeholder);
    comboBox.setListBoxValues(listBoxValues);
    comboBox.setShowCustomValues(true);

    this.quoteStringValues = quoteStringValues;
    this.editPrefix = editPrefix;
    this.editSuffix = editSuffix;
    this.customPrompt = customPrompt;
  }
 ListBoxValues getListBoxValues() {
   return comboBox.getListBoxValues();
 }