ListContainerOptions extends BaseHttpRequestOptions { public ListContainerOptions maxResults(int limit) { checkState(limit >= 0, "limit must be >= 0"); checkState(limit <= 10000, "limit must be <= 10000"); queryParameters.put("limit", Integer.toString(limit)); return this; }  ListContainerOptions afterMarker(String marker); String getMarker(); ListContainerOptions maxResults(int limit); int getMaxResults(); ListContainerOptions withPrefix(String prefix); String getPrefix(); ListContainerOptions underPath(String path); String getPath(); static final ListContainerOptions NONE; }
@Test public void testMaxKeys() { ListContainerOptions options = new ListContainerOptions(); options.maxResults(1000); assertEquals(options.buildQueryParameters().get(SwiftConstants.LIMIT), ImmutableList.of("1000")); }
@Test public void testMaxKeysStatic() { ListContainerOptions options = maxResults(1000); assertEquals(options.buildQueryParameters().get(SwiftConstants.LIMIT), ImmutableList.of("1000")); }
@Test(expectedExceptions = IllegalStateException.class) public void testMaxKeysNegative() { maxResults(-1); }