diff --git a/src/test/java/com/homihq/db2rest/rest/MySQLFunctionControllerTest.java b/src/test/java/com/homihq/db2rest/rest/MySQLFunctionControllerTest.java index 2c581c86..61e0fc8d 100644 --- a/src/test/java/com/homihq/db2rest/rest/MySQLFunctionControllerTest.java +++ b/src/test/java/com/homihq/db2rest/rest/MySQLFunctionControllerTest.java @@ -7,10 +7,12 @@ import java.util.Map; -import static org.hamcrest.Matchers.*; +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.instanceOf; import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -25,8 +27,10 @@ void execute() throws Exception { """; mockMvc.perform(post("/function/GetMovieRentalRateFunc") - .contentType(MediaType.APPLICATION_JSON).characterEncoding("utf-8") - .content(json).accept(MediaType.APPLICATION_JSON)) + .characterEncoding(UTF_8) + .contentType(MediaType.APPLICATION_JSON) + .accept(MediaType.APPLICATION_JSON) + .content(json)) .andExpect(status().isOk()) .andExpect(jsonPath("$", instanceOf(Map.class))) .andExpect(jsonPath("$.*", hasSize(1))) diff --git a/src/test/java/com/homihq/db2rest/rest/MySQLProcedureControllerTest.java b/src/test/java/com/homihq/db2rest/rest/MySQLProcedureControllerTest.java index 70d3fb24..79e6a9a1 100644 --- a/src/test/java/com/homihq/db2rest/rest/MySQLProcedureControllerTest.java +++ b/src/test/java/com/homihq/db2rest/rest/MySQLProcedureControllerTest.java @@ -7,10 +7,12 @@ import java.util.Map; -import static org.hamcrest.Matchers.*; +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.instanceOf; import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -26,8 +28,10 @@ void execute() throws Exception { """; mockMvc.perform(post("/procedure/GetMovieRentalRateProc") - .contentType(MediaType.APPLICATION_JSON).characterEncoding("utf-8") - .content(json).accept(MediaType.APPLICATION_JSON)) + .characterEncoding(UTF_8) + .contentType(MediaType.APPLICATION_JSON) + .accept(MediaType.APPLICATION_JSON) + .content(json)) .andExpect(status().isOk()) .andExpect(jsonPath("$", instanceOf(Map.class))) .andExpect(jsonPath("$.*", hasSize(2))) diff --git a/src/test/java/com/homihq/db2rest/rest/PgFunctionControllerTest.java b/src/test/java/com/homihq/db2rest/rest/PgFunctionControllerTest.java index ac864566..bbcbddda 100644 --- a/src/test/java/com/homihq/db2rest/rest/PgFunctionControllerTest.java +++ b/src/test/java/com/homihq/db2rest/rest/PgFunctionControllerTest.java @@ -7,10 +7,12 @@ import java.util.Map; -import static org.hamcrest.Matchers.*; +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.instanceOf; import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -26,8 +28,10 @@ void execute() throws Exception { """; mockMvc.perform(post("/function/GetMovieRentalRateFunc") - .contentType(MediaType.APPLICATION_JSON).characterEncoding("utf-8") - .content(json).accept(MediaType.APPLICATION_JSON)) + .characterEncoding(UTF_8) + .contentType(MediaType.APPLICATION_JSON) + .accept(MediaType.APPLICATION_JSON) + .content(json)) .andExpect(status().isOk()) .andExpect(jsonPath("$", instanceOf(Map.class))) .andExpect(jsonPath("$.*", hasSize(1))) diff --git a/src/test/java/com/homihq/db2rest/rest/PgProcedureControllerTest.java b/src/test/java/com/homihq/db2rest/rest/PgProcedureControllerTest.java index 41263d43..730dec93 100644 --- a/src/test/java/com/homihq/db2rest/rest/PgProcedureControllerTest.java +++ b/src/test/java/com/homihq/db2rest/rest/PgProcedureControllerTest.java @@ -7,10 +7,12 @@ import java.util.Map; -import static org.hamcrest.Matchers.*; +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.instanceOf; import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -26,8 +28,10 @@ void execute() throws Exception { """; mockMvc.perform(post("/procedure/GetMovieRentalRateProc") - .contentType(MediaType.APPLICATION_JSON).characterEncoding("utf-8") - .content(json).accept(MediaType.APPLICATION_JSON)) + .characterEncoding(UTF_8) + .contentType(MediaType.APPLICATION_JSON) + .accept(MediaType.APPLICATION_JSON) + .content(json)) .andExpect(status().isOk()) .andExpect(jsonPath("$", instanceOf(Map.class))) .andExpect(jsonPath("$.*", hasSize(1)))