HttpField { public String[] getValues() { if (value == null) return null; QuotedCSV list = new QuotedCSV(false, value); return list.getValues().toArray(new String[list.size()]); } HttpField(HttpHeader header, String name, String value);  HttpField(HttpHeader header, String value);  HttpField(HttpHeader header, HttpHeaderValue value);  HttpField(String name, String value); HttpHeader getHeader(); String getName(); String getLowerCaseName(); String getValue(); int getIntValue(); long getLongValue(); String[] getValues(); boolean contains(String search); @Override String toString(); boolean isSameName(HttpField field); @Override int hashCode(); @Override boolean equals(Object o);  }
@Test void testValues() { String[] values = new HttpField("name", "value").getValues(); assertEquals(1, values.length); assertEquals("value", values[0]); values = new HttpField("name", "a,b,c").getValues(); assertEquals(3, values.length); assertEquals("a", values[0]); assertEquals("b", values[1]); assertEquals("c", values[2]); values = new HttpField("name", "a,\"x,y,z\",c").getValues(); assertEquals(3, values.length); assertEquals("a", values[0]); assertEquals("x,y,z", values[1]); assertEquals("c", values[2]); values = new HttpField("name", "a,\"x,\\\"p,q\\\",z\",c").getValues(); assertEquals(3, values.length); assertEquals("a", values[0]); assertEquals("x,\"p,q\",z", values[1]); assertEquals("c", values[2]); }