@Test @UseDataProvider("provideInvalidStatusCode") public void invalidStatusCode(final Operation operation, final int statusCode, final Class<Exception> expectedException) { this.thrown.expect(expectedException); this.stats.getStatusCode(operation, statusCode); }
public long getStatusCode(final Operation operation, final int statusCode) { checkNotNull(operation); checkArgument(HttpUtil.VALID_STATUS_CODES.contains(statusCode), "statusCode must be a valid status code [%s]", statusCode); return this.scCounters.get(operation).get(statusCode); }
Statistics { public long getStatusCode(final Operation operation, final int statusCode) { checkNotNull(operation); checkArgument(HttpUtil.VALID_STATUS_CODES.contains(statusCode), "statusCode must be a valid status code [%s]", statusCode); return this.scCounters.get(operation).get(statusCode); } }
Statistics { public long getStatusCode(final Operation operation, final int statusCode) { checkNotNull(operation); checkArgument(HttpUtil.VALID_STATUS_CODES.contains(statusCode), "statusCode must be a valid status code [%s]", statusCode); return this.scCounters.get(operation).get(statusCode); } @Inject  Statistics(); }
Statistics { public long getStatusCode(final Operation operation, final int statusCode) { checkNotNull(operation); checkArgument(HttpUtil.VALID_STATUS_CODES.contains(statusCode), "statusCode must be a valid status code [%s]", statusCode); return this.scCounters.get(operation).get(statusCode); } @Inject  Statistics(); @Subscribe void update(final TestState state); @Subscribe void update(final Request request); @Subscribe void update(final Pair<Request, Response> result); void setOperation(final Operation operation); long get(final Operation operation, final Counter counter); long getStatusCode(final Operation operation, final int statusCode); Map<Integer, Long> statusCodes(final Operation operation); @Override String toString(); }
Statistics { public long getStatusCode(final Operation operation, final int statusCode) { checkNotNull(operation); checkArgument(HttpUtil.VALID_STATUS_CODES.contains(statusCode), "statusCode must be a valid status code [%s]", statusCode); return this.scCounters.get(operation).get(statusCode); } @Inject  Statistics(); @Subscribe void update(final TestState state); @Subscribe void update(final Request request); @Subscribe void update(final Pair<Request, Response> result); void setOperation(final Operation operation); long get(final Operation operation, final Counter counter); long getStatusCode(final Operation operation, final int statusCode); Map<Integer, Long> statusCodes(final Operation operation); @Override String toString();  }