GetOptions extends BaseHttpRequestOptions { public GetOptions visibilityTimeout(int timeout) { checkArgument(timeout > 0 && timeout <= 2 * 60 * 60, "timeout is in seconds; must be positive and maximum 2 hours"); queryParameters.replaceValues("visibilitytimeout", ImmutableList.of(timeout + "")); return this; }  GetOptions maxMessages(int count); GetOptions visibilityTimeout(int timeout); static final GetOptions NONE; }
@Test(expectedExceptions = IllegalArgumentException.class) public void testVisibilityTimeoutTooSmall() { new GetOptions().visibilityTimeout(0); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testVisibilityTimeoutTooBig() { new GetOptions().visibilityTimeout((2 * 60 * 60) + 1); }