### Question:
QueryString extends LinkedHashMap<String, String> { @Override public String toString() { return UriHelper.serializeParameters(this); } QueryString();  QueryString(final String... nameValuePairs); @Override String toString();  }### Answer:
@Test public void toString_typical() throws Exception { final QueryString cut = new QueryString(); cut.put("answer", "42"); final String actual = cut.toString(); Assert.assertEquals("answer=42", actual); }
@Test public void constructor_typical() throws Exception { final QueryString cut = new QueryString("answer", "42"); final String actual = cut.toString(); Assert.assertEquals("answer=42", actual); }
@Test public void constructor_twoPairs() throws Exception { final QueryString cut = new QueryString("answer", "42", "question", "whatdoyoug"); final String actual = cut.toString(); Assert.assertEquals("answer=42&question=whatdoyoug", actual); }