https://howtodoinjava.com/spring-boot2/resttemplate/resttemplate-post-json-example/ @Test public void testAddEmployeeWithoutHeader_success() throws URISyntaxException { RestTemplate restTemplate = new RestTemplate(); final String baseUrl = " http://localhost: " +randomServerPort+ "/employees/" ; URI uri = new URI(baseUrl); //Nodejs 에게 보낼려면 이 부분을 JSONObject 로 만들면 될듯? Employee employee = new Employee( null , "Adam" , "Gilly" , "test@email.com" ); HttpHeaders headers = new HttpHeaders(); headers.set( "X-COM-PERSIST" , "true" ); headers.set( "X-COM-LOCATION" , "USA" ); HttpEntity<Employee> request = new HttpEntity<>(employee, headers); ResponseEntity<String> result = restTemplate.postForEntity(uri, request, String. class ); //Verify request succeed Assert.assertEquals( 201 , result.ge