@Test public void shouldRejectInvalidValidNetworkItemList() { AccessList al = new AccessList(); al.getNetworkItems().add(initNetworkItem("192.168.3.1/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.2/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.3/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.4/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.5/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.6/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.7/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.8/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.9/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.10/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.11/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.12/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.13/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.14/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.15/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.16/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.17/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.18/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.19/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.20/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.21/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.22/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.23/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.24/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.25/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.26/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.27/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.28/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.29/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.30/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.31/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.32/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.33/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.34/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.35/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.36/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.37/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.38/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.39/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.40/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.41/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.42/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.4.43/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.4.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.5.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.6.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.7.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.8.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.9.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.50.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.51.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.52.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.53.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.55/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.56/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.57/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.58/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.59/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.60/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.61/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.62/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.63/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.64/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.65/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.66/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.67/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.68/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.69/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.70/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.71/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.72/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.73/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.74/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.75/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.76/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.77/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.78/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.79/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.80/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.81/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.82/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.83/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.84/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.85/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.86/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.87/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.88/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.89/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.90/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.91/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.92/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.93/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.94/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.95/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.96/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.97/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.98/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.99/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.167.3.01/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("192.168.3.54/32", "DENY", null)); al.getNetworkItems().add(initNetworkItem("::/32", "DENY", null)); ValidatorResult result = alValidator.validate(al, POST); assertFalse(resultMessage(result, POST), result.passedValidation()); result = alValidator.validate(al, PUT); assertFalse(resultMessage(result, PUT), result.passedValidation()); }
@Override public ValidatorResult validate(AccessList accessList, Object httpRequestType) { ValidatorResult result = validator.validate(accessList, httpRequestType); return ValidatorUtilities.removeEmptyMessages(result); }
AccessListValidator implements ResourceValidator<AccessList> { @Override public ValidatorResult validate(AccessList accessList, Object httpRequestType) { ValidatorResult result = validator.validate(accessList, httpRequestType); return ValidatorUtilities.removeEmptyMessages(result); } }
AccessListValidator implements ResourceValidator<AccessList> { @Override public ValidatorResult validate(AccessList accessList, Object httpRequestType) { ValidatorResult result = validator.validate(accessList, httpRequestType); return ValidatorUtilities.removeEmptyMessages(result); } AccessListValidator(); }
AccessListValidator implements ResourceValidator<AccessList> { @Override public ValidatorResult validate(AccessList accessList, Object httpRequestType) { ValidatorResult result = validator.validate(accessList, httpRequestType); return ValidatorUtilities.removeEmptyMessages(result); } AccessListValidator(); @Override ValidatorResult validate(AccessList accessList, Object httpRequestType); @Override Validator<AccessList> getValidator(); }
AccessListValidator implements ResourceValidator<AccessList> { @Override public ValidatorResult validate(AccessList accessList, Object httpRequestType) { ValidatorResult result = validator.validate(accessList, httpRequestType); return ValidatorUtilities.removeEmptyMessages(result); } AccessListValidator(); @Override ValidatorResult validate(AccessList accessList, Object httpRequestType); @Override Validator<AccessList> getValidator();  }