The steps to test our insertProduct method are as follows:
- As we did for inserting a product, fire up Eureka and ProductService again.
- Let's change the product description of the first product to Fuji Apples. So, our JSON looks like {"id":1,"name":"Fuji Apples","catId":1}.
- Prepare Postman to submit the PUT request as follows:
- Hit Send. You will get a response 200 OK with the body containing the JSON {"id":1,"name":"Fuji Apples","catId":1}.
- Fire a GET request http://localhost:8082/product/1 to check the change. You will find apples changed to Fuji Apples.