### Question:
ListBoxValues { public void addValues(final List<String> acceptableValues) { clear(); if (acceptableValues != null) { List<String> displayValues = createDisplayValues(acceptableValues); acceptableValuesWithoutCustomValues.addAll(displayValues); if (allowEmpty) { acceptableValuesWithCustomValues.add(""); } acceptableValuesWithCustomValues.add(customPrompt); acceptableValuesWithCustomValues.addAll(displayValues); } } 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 testAddValues() { List<String> processVarStartValuesList = Arrays.asList( "** Variable Definitions **", "employee", "reason", "performance" ); Map<String, String> processVarStartValuesMap = new TreeMap<>(); processVarStartValuesMap.put("def", "** Variable Definitions **"); processVarStartValuesMap.put("emp", "employee"); processVarStartValuesMap.put("rea", "reason"); processVarStartValuesMap.put("per", "performance"); ListBoxValues test1 = new ListBoxValues("CustomPrompt", "Edit", null, ActivityDataIOEditorViewImpl.EXPRESSION_MAX_DISPLAY_LENGTH, false); test1.addValues(processVarStartValuesList); Assert.assertFalse(test1.acceptableValuesWithCustomValues.contains("")); ListBoxValues test2 = new ListBoxValues("CustomPrompt", "Edit", null, ActivityDataIOEditorViewImpl.EXPRESSION_MAX_DISPLAY_LENGTH, true); test2.addValues(processVarStartValuesList); Assert.assertTrue(test2.acceptableValuesWithCustomValues.contains("")); ListBoxValues test3 = new ListBoxValues("CustomPrompt", "Edit", null, true); test3.addValues(processVarStartValuesList); Assert.assertTrue(test3.acceptableValuesWithCustomValues.contains("")); ListBoxValues test4 = new ListBoxValues("CustomPrompt", "Edit", null, true); List<String> emptyList = null; test4.addValues(emptyList); ListBoxValues test5 = new ListBoxValues("CustomPrompt", "Edit", null, true); test5.addValues(processVarStartValuesMap); Assert.assertTrue(test5.acceptableValuesWithCustomValues.contains("")); ListBoxValues test6 = new ListBoxValues("CustomPrompt", "Edit", null, false); test6.addValues(processVarStartValuesMap); Assert.assertFalse(test6.acceptableValuesWithCustomValues.contains("")); }