Description
Add unit tests for the blog page using JUnit 5 and Mockito. The current implementation lacks coverage for rendering, data fetching, and error handling, which may affect user experience.
Tasks
- Set up test configuration for JUnit 5
- Mock dependencies using Mockito
- Write unit tests for blog page controller/service
- Test blog list rendering
- Test individual blog detail page rendering
- Validate data mapping (title, content, author, date)
- Test pagination behavior
- Mock external CMS responses (if applicable)
- Test error handling (API failure, empty state)
- Ensure good test coverage
Description
Add unit tests for the blog page using JUnit 5 and Mockito. The current implementation lacks coverage for rendering, data fetching, and error handling, which may affect user experience.
Tasks