Question: 1 3 . SpringBoot ( Debugging ) : Sells API Environment ava version: 1 . 8 Maven version: 3 . * Spring Boot version: 2

13. SpringBoot (Debugging): Sells API Environment ava version: 1.8 Maven version: 3.* Spring Boot version: 2.3.4.RELEASE Data Example of a Sell data JSON object: "id": 1, "productName": "product1", "customerEmail": "custegmail.com", "sellingPrice": 200, "buyingPrice": 100 Requirements In this project, sell data are provided for many countries with API endpoints for fetching specific information. Note that all the data are virtual. The following REST endpoints have been implemented. POST request to / sell: - accepts a sell object, returns status code 201 if the object is valid - all the properties are validated usil the following rules: - productName cannot b empty, if empty, then returns status code 400 and message "Product name is mandatory" - customerEmail should be a valid email, if invalid, returns status code 400 and message "Invalid customer email" - sellingPrice should be positive integer. if invalid, retums status code 400 and message "Value should be none negative" buyingPrice should be positive integer. if invalid, returns status code 400 and message "Value should be none. - buyingPrice should be positive integer, if invalid, returns status code 400 and message "Value should be none negative" GET request to /sell/{id} : - returns the sell entry with given id and status code 200 GET request to / sell: - returns all the sell entries with status code 200 There are 4 tests already written but some are failing due to bugs in the implementation of those endpoints. Find the bugs and fix them so that all the tests pass. Commands - run: mvn clean spring-boot:run There are 4 tests already written but some are failing due to bugs in the implementation of those endpoints. Find the bugs and fix them so that all the tests pass. Commands run: mvn clean spring-boot:run install: mvn clean install test: mvn clean test

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!