private void WebServiceBuildsCriteriaWithClaimantName(ClaimSearch cs) {
    queryParams.with("claimantName", "Name");
    Capture<ClaimSearchCriteria> captured = new Capture<ClaimSearchCriteria>();

    cs.findClaims(GROUPS, emptyClaims(), captured);
    ClaimSearchCriteria criteria = captured.getValue();
    assertThat(criteria.getClaimantName(), is(equalTo("Name")));
  }
  private void WebServiceBuildsCriteriaWithPolicyNumber(ClaimSearch cs) {
    queryParams.with(ClaimsWebService.POLICY_ID, "12345");
    Capture<ClaimSearchCriteria> captured = new Capture<ClaimSearchCriteria>();

    cs.findClaims(GROUPS, emptyClaims(), captured);
    ClaimSearchCriteria criteria = captured.getValue();
    assertThat(criteria.getPolicyId(), is(12345L));
  }
  @Test
  public void WebServiceBuildsCriteriaWithPolicyBeginDateRange() {
    Capture<ClaimSearchCriteria> captured = new Capture<ClaimSearchCriteria>();
    queryParams.with("policyDateStart", "01012004").with("policyDateEnd", "01012006");

    new SlClaimSearch().findClaims(GROUPS, emptyClaims(), captured);

    ClaimSearchCriteria criteria = captured.getValue();
    assertThat(criteria.getPolicyBeginDate(), is(createDate("2004/01/01")));
    assertThat(criteria.getPolicyEndDate(), is(createDate("2006/01/01")));
  }