### Question:
ListBoxValues { public String addCustomValue(final String newValue, final String oldValue) { if (oldValue != null && !oldValue.isEmpty()) { acceptableValuesWithCustomValues.remove(oldValue); customValues.remove(oldValue); } if (newValue != null && !newValue.isEmpty()) { String newDisplayValue = addDisplayValue(newValue); if (!acceptableValuesWithCustomValues.contains(newDisplayValue)) { int index = 1; if (acceptableValuesWithCustomValues.size() < 1) { index = acceptableValuesWithCustomValues.size(); } acceptableValuesWithCustomValues.add(index, newDisplayValue); } if (!customValues.contains(newDisplayValue)) { customValues.add(newDisplayValue); } return newDisplayValue; } else { return newValue; } } ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final int maxDisplayLength,
                         final boolean allowEmpty);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final int maxDisplayLength);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final boolean allowEmpty);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester);  ListBoxValues(final ListBoxValues copy,
                         final boolean copyCustomValues); String getEditPrefix(); void addValues(final List<String> acceptableValues); void addValues(final Map<String, String> acceptableValues); String addCustomValue(final String newValue,
                                 final String oldValue); List<String> update(final String currentValue); List<String> getAcceptableValuesWithCustomValues(); List<String> getAcceptableValuesWithoutCustomValues(); boolean isCustomValue(final String value); String getValueForDisplayValue(final String key); String getDisplayNameForValue(final String value); String getNonCustomValueForUserString(final String userValue); String toString(); static final String EDIT_SUFFIX; }### Answer:
@Test public void testAddCustomValues() { ListBoxValues processVarValues = new ListBoxValues("Constant ...", "Edit ", null); processVarValues.customValues.add(CUSTOM_VALUE); assertEquals(CUSTOM_VALUE, processVarValues.addCustomValue(CUSTOM_VALUE, null)); }