|
8 | 8 | import static org.junit.jupiter.api.Assertions.assertNotNull; |
9 | 9 | import static org.junit.jupiter.api.Assertions.assertNull; |
10 | 10 |
|
11 | | -import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; |
12 | | -import com.fasterxml.jackson.annotation.JsonInclude.Include; |
13 | | -import com.fasterxml.jackson.annotation.PropertyAccessor; |
14 | | -import com.fasterxml.jackson.databind.DeserializationFeature; |
15 | | -import com.fasterxml.jackson.databind.ObjectMapper; |
16 | | -import com.fasterxml.jackson.databind.SerializationFeature; |
17 | | -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; |
18 | 11 | import io.scalecube.services.Address; |
19 | 12 | import io.scalecube.services.Microservices; |
20 | 13 | import io.scalecube.services.Microservices.Context; |
@@ -94,19 +87,6 @@ static void afterAll() { |
94 | 87 | } |
95 | 88 | } |
96 | 89 |
|
97 | | - private static ObjectMapper objectMapper() { |
98 | | - ObjectMapper mapper = new ObjectMapper(); |
99 | | - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); |
100 | | - mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); |
101 | | - mapper.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL, true); |
102 | | - mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); |
103 | | - mapper.setVisibility(PropertyAccessor.ALL, Visibility.ANY); |
104 | | - mapper.setSerializationInclusion(Include.NON_NULL); |
105 | | - mapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true); |
106 | | - mapper.registerModule(new JavaTimeModule()); |
107 | | - return mapper; |
108 | | - } |
109 | | - |
110 | 90 | @Nested |
111 | 91 | @TestInstance(Lifecycle.PER_CLASS) |
112 | 92 | class GatewayTests { |
@@ -186,7 +166,7 @@ void testHead() { |
186 | 166 | SomeResponse.class)) |
187 | 167 | .assertNext( |
188 | 168 | message -> { |
189 | | - assertNull(message.data(), "data"); |
| 169 | + assertNull(message.data(), "data"); // this is HEAD |
190 | 170 | assertNotNull(message.headers(), "headers"); |
191 | 171 | assertThat(message.headers(), not(hasKey(HEADER_ERROR_TYPE))); |
192 | 172 | }) |
|
0 commit comments