Our trainees applied for TVM Infotech Fresher Java Developer positions recently. Below is the Interview questions asked there for them. Instead of asking traditional Java Questions, in TVM – They asked the candidates to complete a Project in TVM Infotech.

TVM Infotech Fresher Java Developer Interview Questions
Description:
In the current sprint, which is working towards the MVP version of the product, you are asked to develop service APIs following microservices best practices for customers to view products in different categories. In addition to this admins will be able to add, and remove product, and update product prices and/or inventory at any time.
Use Case:
- As a customer, I want to view products in a category and have them arranged on the page based on inventory availability or price that I select.
- As an admin, I want to be able to add, and remove product or update product prices and/or inventory at any time.
Business Criteria:
- The category page should not display products if their inventory is unavailable or limited.
- If there are no products available with sufficient inventory, an error message should be displayed on the category page.
- If a non-existent category is requested, an error message is to be sent back
Technical Criteria:
- Design and develop the application using microservices best practices. All the services should be independently deployable, scalable etc.
- The sample json provided for the application has price and inventory populated in the product listing. Make sure that price and inventory are two separate subdomain.
- Any service to service communication should use mechanism to avoid cascading failures. Make sure three retries are performed and if data is not available, NAN is populated as value.
- The application should be demonstrated using Swagger in a containerized environment, with a DB running in another containerized environment.
- The code should be of production quality, with proper unit test coverage (at least 80%).
- Java use : JUnit 5 and Mockito should be used for test cases, avoiding integration test cases as much as possible.
- .NET Use : NUnit latest version should be used for test cases.
- Modularity is required for easy maintenance, and logging/ tracing for operation support.
- Proper exception handling with standard HTTP status codes and Swagger documentation is expected.
- API best practices should be followed
- Lombok should be used to reduce boilerplate code. Libraries like ModelMapper can be used for copying object data.
- The system should be demonstrated with an API gateway and service discovery.
- Relevant data models and entity relationships should be designed and added to the DB. Any DB type (SQL or NoSQL), including in-memory databases, can be used for the current implementation. The chosen DB type should be justified. Sample data related to two categories are provided.
- While updating the category, validation should be performed for price format, at least one attribute availability, and mandatory fields of name, brand, and description.
- The response format should follow a common response format for success and errors as well with including trace-id in all the responses.