@Test
public void testUnescapeCsvFields() {

    assertEquals(Arrays.asList(""), unescapeCsvFields(""));
    assertEquals(Arrays.asList("", ""), unescapeCsvFields(","));
    assertEquals(Arrays.asList("a", ""), unescapeCsvFields("a,"));
    assertEquals(Arrays.asList("", "a"), unescapeCsvFields(",a"));
    assertEquals(Arrays.asList("\""), unescapeCsvFields("\"\"\"\""));
    assertEquals(Arrays.asList("\"", "\""), unescapeCsvFields("\"\"\"\",\"\"\"\""));
    assertEquals(Arrays.asList("netty"), unescapeCsvFields("netty"));
    assertEquals(Arrays.asList("hello", "netty"), unescapeCsvFields("hello,netty"));
    assertEquals(Arrays.asList("hello,netty"), unescapeCsvFields("\"hello,netty\""));
    assertEquals(Arrays.asList("hello", "netty"), unescapeCsvFields("\"hello\",\"netty\""));
    assertEquals(Arrays.asList("a\"b", "c\"d"), unescapeCsvFields("\"a\"\"b\",\"c\"\"d\""));
    assertEquals(Arrays.asList("a\rb", "c\nd"), unescapeCsvFields("\"a\rb\",\"c\nd\""));
}