GetOptions extends BaseHttpRequestOptions { public GetOptions maxMessages(int count) { checkArgument(count > 0&& count <= 32, "count must be a positive number; max 32"); queryParameters.replaceValues("numofmessages", ImmutableList.of(count + "")); return this; }  GetOptions maxMessages(int count); GetOptions visibilityTimeout(int timeout); static final GetOptions NONE; }
@Test(expectedExceptions = IllegalArgumentException.class) public void testMaxMessagesTooSmall() { new GetOptions().maxMessages(0); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testMaxMessagesTooBig() { new GetOptions().maxMessages(33); }