Throw AssertionError instead of IAE in MockRestRequestMatchers

This commit is contained in:
Sam Brannen 2018-03-07 13:22:21 +01:00
parent 4094879daf
commit fef0c7b151
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -147,7 +147,7 @@ public abstract class MockRestRequestMatchers {
List<String> values = map.get(name);
String message = "Expected " + valueType + " <" + name + ">";
Assert.notNull(values, message);
assertTrue(message + " to exist but was null", values != null);
assertTrue(message + " to have at least <" + count + "> values but found " + values,
count <= values.size());