### Question:
UrlQuery { Iterable<String> parameterNames() { return parameters().stream().map(Parameter::key).distinct().collect(toList()); } private  UrlQuery(List<Parameter> parameters); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void providesParameterNames() { assertThat(query.parameterNames(), contains("foo", "bar")); }