### Question:
StringUtils { public static <E extends Enum<E>> List<E> parseListEnums(final String s, final Class<E> enumClass) { final List<E> enums = new ArrayList<>(); final String[] substrings = s.trim().split(","); for (final String substring : substrings) { final E value = parseEnum(substring, enumClass); if (value == null) { throw new IllegalArgumentException( "Unable to parse list element, expected enum constant name but actual was [" + substring + "]"); } enums.add(value); } return enums; }  static String replaceSubstring(final String s, final int startIndex, final int endIndex,
            final String replacement); static List<E> parseListEnums(final String s, final Class<E> enumClass); static E parseEnum(final String s, final Class<E> enumClass); static E fromValue(final Class<E> enumClass, final String value); static String join(final List<String> substrings, final String join); static String join(final List<String> substrings); static boolean containsPattern(final String string, final String pattern); static boolean containsPattern(final String string, final Pattern pattern);  }### Answer:
@Test public void shouldParseListEnums_withStringAndEnumClass() { final String s = "Value One, value TWO "; final Class<TestEnum> enumClass = TestEnum.class; final List<TestEnum> result = StringUtils.parseListEnums(s, enumClass); assertEquals(Arrays.asList(TestEnum.VALUE_ONE, TestEnum.VALUE_TWO), result); }
@Test public void shouldNotParseListEnums_withStringContainingBlankElement() { final String s = "Value One, ,Value One"; final Class<TestEnum> enumClass = TestEnum.class; IllegalArgumentException thrownException = null; try { StringUtils.parseListEnums(s, enumClass); } catch (final IllegalArgumentException e) { thrownException = e; } assertNotNull(thrownException); }