Skip to content

Commit 3c5ddaa

Browse files
committed
WIP
1 parent addf07b commit 3c5ddaa

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

services-gateway/src/test/java/io/scalecube/services/gateway/rest/RestGatewayTest.java

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88
import static org.junit.jupiter.api.Assertions.assertNotNull;
99
import static org.junit.jupiter.api.Assertions.assertNull;
1010

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;
1811
import io.scalecube.services.Address;
1912
import io.scalecube.services.Microservices;
2013
import io.scalecube.services.Microservices.Context;
@@ -94,19 +87,6 @@ static void afterAll() {
9487
}
9588
}
9689

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-
11090
@Nested
11191
@TestInstance(Lifecycle.PER_CLASS)
11292
class GatewayTests {
@@ -186,7 +166,7 @@ void testHead() {
186166
SomeResponse.class))
187167
.assertNext(
188168
message -> {
189-
assertNull(message.data(), "data");
169+
assertNull(message.data(), "data"); // this is HEAD
190170
assertNotNull(message.headers(), "headers");
191171
assertThat(message.headers(), not(hasKey(HEADER_ERROR_TYPE)));
192172
})

0 commit comments

Comments
 (0)