Create PersonRepositoryImpl in the repository package.
Implement logic to read from and write to a JSON file using Jackson library methods.
Ensure the repository handles edge cases like empty or malformed JSON files.
Testing:
Write unit tests to verify the findAll(), findById(), save(), and deleteById() methods function as expected.
Create sample data in persons.json to test with.
Acceptance Criteria:
A PersonRepositoryImpl class exists and correctly handles CRUD operations for Person objects via JSON file I/O.
Methods should work as expected with test data.
Unit tests should cover all repository methods.
Tasks:
Create PersonRepositoryImpl in the repository package. Implement logic to read from and write to a JSON file using Jackson library methods. Ensure the repository handles edge cases like empty or malformed JSON files.
Write unit tests to verify the findAll(), findById(), save(), and deleteById() methods function as expected. Create sample data in persons.json to test with.
Acceptance Criteria:
A PersonRepositoryImpl class exists and correctly handles CRUD operations for Person objects via JSON file I/O. Methods should work as expected with test data. Unit tests should cover all repository methods.