### Question:
ListBoxValues { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("acceptableValuesWithoutCustomValues:\n"); for (String value : acceptableValuesWithoutCustomValues) { sb.append('\t').append(value).append(",\n"); } sb.append('\n'); sb.append("acceptableValuesWithCustomValues:\n"); for (String value : acceptableValuesWithCustomValues) { sb.append('\t').append(value).append(",\n"); } return sb.toString(); } 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 testToString() { ListBoxValues processVarValues = new ListBoxValues("Constant ...", "Edit ", null); processVarValues.acceptableValuesWithoutCustomValues.add(CUSTOM_VALUE); processVarValues.acceptableValuesWithCustomValues.add(CUSTOM_VALUE); String expected = "acceptableValuesWithoutCustomValues:\n" + "\tCustom Value,\n" + "\n" + "acceptableValuesWithCustomValues:\n" + "\tCustom Value,\n"; String result = processVarValues.toString(); assertEquals(expected, result); }