@Test
void testGetCSV() {

    HttpFields fields = new HttpFields();
    fields.put("name0", "value0A,value0B");
    fields.add("name0", "value0C,value0D");
    fields.put("name1", "value1A, \"value\t, 1B\" ");
    fields.add("name1", "\"value1C\",\tvalue1D");
    Enumeration<String> e = fields.getValues("name0");
    assertTrue(e.hasMoreElements());
    assertEquals(e.nextElement(), "value0A,value0B");
    assertTrue(e.hasMoreElements());
    assertEquals(e.nextElement(), "value0C,value0D");
    assertFalse(e.hasMoreElements());
    e = Collections.enumeration(fields.getCSV("name0", false));
    assertTrue(e.hasMoreElements());
    assertEquals(e.nextElement(), "value0A");
    assertTrue(e.hasMoreElements());
    assertEquals(e.nextElement(), "value0B");
    assertTrue(e.hasMoreElements());
    assertEquals(e.nextElement(), "value0C");
    assertTrue(e.hasMoreElements());
    assertEquals(e.nextElement(), "value0D");
    assertFalse(e.hasMoreElements());
    e = Collections.enumeration(fields.getCSV("name1", false));
    assertTrue(e.hasMoreElements());
    assertEquals(e.nextElement(), "value1A");
    assertTrue(e.hasMoreElements());
    assertEquals(e.nextElement(), "value\t, 1B");
    assertTrue(e.hasMoreElements());
    assertEquals(e.nextElement(), "value1C");
    assertTrue(e.hasMoreElements());
    assertEquals(e.nextElement(), "value1D");
    assertFalse(e.hasMoreElements());
}