ParametersSupport { public void transferValue(final Buffer dst) { if (this.isDirty) { ensureParams(); } if (this.originalParams != null) { this.originalParams.getBytes(0, dst); } else { this.params.getBytes(0, dst); } } ParametersSupport();  ParametersSupport(final Buffer params); boolean hasParameters(); boolean hasParameter(final Buffer name); Buffer getParameter(final Buffer name); Set<Map.Entry<Buffer, Buffer>> getAllParameters(); void removeParameter(final Buffer name); Buffer getParameter(final String name); void setParameter(final String name, final String value); void setParameter(final Buffer name, final Buffer value); Buffer toBuffer(); void transferValue(final Buffer dst);  }
@Test public void testTransferValue() { ParametersSupport support = new ParametersSupport(null); support.setParameter("hello", "again"); assertTransferValue(support, ";hello=again"); support.setParameter("hello", "again"); assertTransferValue(support, ";hello=again"); support.setParameter("a", ""); support.setParameter("apa", "monkey"); assertTransferValue(support, ";hello=again;a;apa=monkey"); support = new ParametersSupport(wrap(";a;b=c;d")); assertTransferValue(support, ";a;b=c;d"); support.setParameter("a", ""); assertTransferValue(support, ";a;b=c;d"); support.setParameter("a", "word"); assertTransferValue(support, ";a=word;b=c;d"); }