@Test(expected = ValidationException.class)
public void testArrayTooLarge()
{
final int tooLarge = 26;
Stream stream = new Stream();
stream.setName("something");
String request = "{ query : { recipient: [ ";
for (int i = 0; i < tooLarge; i++)
{
if (i > 0)
{
request += ",";
}
request += "{ name: 'something" + i + "', type: 'GROUP' }";
}
request += "] } }";
stream.setRequest(request);
PrincipalActionContext actionContext = new ServiceActionContext(stream, null);
sut.validate(actionContext);
}