F1 (Java) Story 2: Set up Unit and Integration Testing
Description
Set up a structure for unit and integration testing within the project repository. This ensures the quality, reliability, and robustness of the code being developed. The testing framework must be compatible with Java and Spring Boot.
Acceptance Criteria
- Suitable unit and integration testing frameworks, such as JUnit, Mockito, PowerMock, are selected and set up.
- Example unit and integration tests have been created to validate a sample functionality.
- Unit and integration tests can be run successfully and results are clearly reported.
- Testing instructions are included in the README file.
- The testing modules should be implemented in a way that aligns with existing core OSDU services (e.g. Storage, Search, etc.).
Testing Scenarios
- Validate that the unit and integration test structure has been correctly set up by successfully running the example tests.
- Verify that the test results are easy to understand and accurately reflect the state of the code.
Technical Notes
- Consult the testing section of the Spring Boot documentation and Mockito, PowerMock resources for guidance on setting up tests in a Spring Boot application.
- Use the advanced testing frameworks, such as JUnit for unit tests, Mockito, PowerMock, and Spring Boot Test for integration tests.
- Use the "os-core-common" and "os-core-lib-aws" OSDU Java libraries, which aligns with how other OSDU core services use them, to reduce boilerplate.