Implement unit tests for persistence layer.