Suppress warnings in tests

This commit is contained in:
Sam Brannen 2022-11-05 14:44:36 +01:00
parent 2afcf60566
commit 4207c4d757
2 changed files with 2 additions and 0 deletions

View File

@ -120,6 +120,7 @@ public class HttpRequestValuesTests {
.addRequestPart("entity", entity)
.build();
@SuppressWarnings("unchecked")
MultiValueMap<String, HttpEntity<?>> map = (MultiValueMap<String, HttpEntity<?>>) requestValues.getBodyValue();
assertThat(map).hasSize(2);
assertThat(map.getFirst("form field").getBody()).isEqualTo("form value");

View File

@ -65,6 +65,7 @@ public class RequestPartArgumentResolverTests {
Object body = this.client.getRequestValues().getBodyValue();
assertThat(body).isNotNull().isInstanceOf(MultiValueMap.class);
@SuppressWarnings("unchecked")
MultiValueMap<String, HttpEntity<?>> map = (MultiValueMap<String, HttpEntity<?>>) body;
assertThat(map.getFirst("part1").getBody()).isEqualTo("part 1");