@Test void countReturnsRequestCountOfMatchingRequestWhenHistoryHasASingleRequest() throws Exception { underTest.add(exchange1); final int got = underTest.count(exchange1.getRequest()); assertThat(got).isEqualTo(1); }
public int count(AppRequest appRequest) { return (int)values.stream().filter(priming -> appRequest.matches(priming.getRequest())).count(); }
CallHistory extends FixedCapacityCache<Exchange> { public int count(AppRequest appRequest) { return (int)values.stream().filter(priming -> appRequest.matches(priming.getRequest())).count(); } }
CallHistory extends FixedCapacityCache<Exchange> { public int count(AppRequest appRequest) { return (int)values.stream().filter(priming -> appRequest.matches(priming.getRequest())).count(); } CallHistory(int capacity); }
CallHistory extends FixedCapacityCache<Exchange> { public int count(AppRequest appRequest) { return (int)values.stream().filter(priming -> appRequest.matches(priming.getRequest())).count(); } CallHistory(int capacity); int count(AppRequest appRequest); }
CallHistory extends FixedCapacityCache<Exchange> { public int count(AppRequest appRequest) { return (int)values.stream().filter(priming -> appRequest.matches(priming.getRequest())).count(); } CallHistory(int capacity); int count(AppRequest appRequest);  }