### Question:
ImmutableQuery implements Query { @Override public int size() { return this.parameters.size(); } private  ImmutableQuery(Map<String, ImmutableQueryParameter> params); @Override boolean isEmpty(); @Override int size(); @Override boolean hasParameter(String paramName); @Override Parameter getParameter(String paramName); @Override String toString(); @Override Set<String> parameterNames();  }### Answer:
@Test public void testHasCorrectSizeWhenParametersAreDefined() { assertThat(queryWithParameters().size(),equalTo(2)); }
@Test public void testHasCorrectSizeWhenNoParametersAreDefined() { assertThat(queryWithoutParameters().size(),equalTo(0)); }