Query { public String valueFor(String name) { return parse().get(name); } Query(String string); @Override String toString(); String valueFor(String name); List<String> paramNames(); String show(); boolean eq(Query that);  }
@Test public void readsParametersByName() { Query testSubject = new Query("?xyz=123&abc=456"); final String abc = testSubject.valueFor("abc"); final String xyz = testSubject.valueFor("xyz"); assertEquals("123", xyz); assertEquals("456", abc); }