Clean up warnings in spring-test
This commit is contained in:
@@ -124,7 +124,6 @@ public abstract class MockRestRequestMatchers {
|
||||
* Assert request header values with the given Hamcrest matcher.
|
||||
*/
|
||||
@SafeVarargs
|
||||
@SuppressWarnings("unchecked")
|
||||
public static RequestMatcher header(final String name, final Matcher<? super String>... matchers) {
|
||||
return new RequestMatcher() {
|
||||
@Override
|
||||
|
||||
@@ -91,7 +91,6 @@ public class MockRestRequestMatchersTests {
|
||||
MockRestRequestMatchers.header("foo", "bad").match(this.request);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void headerContains() throws Exception {
|
||||
this.request.getHeaders().put("foo", Arrays.asList("bar", "baz"));
|
||||
@@ -99,13 +98,11 @@ public class MockRestRequestMatchersTests {
|
||||
MockRestRequestMatchers.header("foo", containsString("ba")).match(this.request);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test(expected = AssertionError.class)
|
||||
public void headerContainsWithMissingHeader() throws Exception {
|
||||
MockRestRequestMatchers.header("foo", containsString("baz")).match(this.request);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test(expected = AssertionError.class)
|
||||
public void headerContainsWithMissingValue() throws Exception {
|
||||
this.request.getHeaders().put("foo", Arrays.asList("bar", "baz"));
|
||||
|
||||
@@ -71,7 +71,6 @@ public class HeaderRequestMatchersIntegrationTests {
|
||||
this.mockServer.verify();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void testStringContains() throws Exception {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user