@Test
public void testParseEnumListIgnoreCase() {

    assertThat(parseEnumListIgnoreCase("", EnumValue.class)).isEmpty();
    assertThat(parseEnumListIgnoreCase("  ", EnumValue.class)).isEmpty();
    assertThat(parseEnumListIgnoreCase("a , B", EnumValue.class)).contains(EnumValue.A, EnumValue.B);
    Map<String, List<EnumValue>> grouping = singletonMap("ab", asList(EnumValue.C, EnumValue.D));
    assertThat(parseEnumListIgnoreCase("a , B, AB", EnumValue.class, grouping::get)).contains(EnumValue.A, EnumValue.B);
    try {
        parseEnumListIgnoreCase("a , bb", EnumValue.class);
        fail("Expected to fail during parsing invalid enum value");
    } catch (IllegalArgumentException e) {
        assertThat(e.getMessage()).contains("bb");
    }
}