TagValue { protected CharSequence getValue(String key) { CharSequence val = tagValues.get(key); if (val == null) return getDefault(key); else return val; } TagValue(String data); int hashCode(); boolean equals(Object obj); Set<String> getTags(); void validate(); String toString();  }
@Test public void testNoTermination() { TagValue t = new TagValue("\r\n\tp=ciao; s=cips; v=DKIM1\r\n\t"); Assert.assertEquals("DKIM1", t.getValue("v")); }
@Test public void testSingleValue() { TagValue t = new TagValue("\r\n\tp = hi\t"); Assert.assertEquals("hi", t.getValue("p")); }
@Test public void testWSPinValue() { TagValue t = new TagValue("\r\n\tp = \r\n hi \thi hi \t hi\t"); Assert.assertEquals("hi \thi hi \t hi", t.getValue("p")); }
@Test public void testFWSinValue() { TagValue t = new TagValue("\r\n\tp = \r\n hi \thi\r\n hi \t hi\t"); Assert.assertEquals("hi \thi\r\n hi \t hi", t.getValue("p")); }