This would be a parent task for writing unit tests to check DB operations executed by `extension:Newsleter`. It would be very similar to https://github.com/wikimedia/mediawiki-extensions-Newsletter/blob/master/tests/NewsletterDbTest.php#L30 and mostly go into the same file as well.
The operations are mainly functions in https://github.com/wikimedia/mediawiki-extensions-Newsletter/blob/master/includes/NewsletterDb.php which needs to be tested.
To write the *unit* test:
# Add your function with correct name (as to what task you are solving) to `NewsletterDbTest.php`
# Write what the Expected Db operations are - follow something like https://github.com/wikimedia/mediawiki-extensions-Newsletter/blob/master/tests/NewsletterDbTest.php#L35-43
# Install `phpmyadmin`(https://help.ubuntu.com/lts/serverguide/phpmyadmin.html) to even see what all tables newsletter extension use. These are prefixed with `nl_tablename`
# Assert if things are correct - check last line of above item
# Run all the tests once by executing `tests/phpunit/phpunit.php extensions/Newsletter` from `core/`
*Expected know-how*: A bit of PHP, some idea about unit testing - and that would be it.
*Difficulty*: moderate, but you can always see what was done before and copy.