The total count returned by ListUnadoptedRepositories is incorrectly
calculated.
The code snippet within ListUnadoptedRepositories used to verify
unadopted repositories is repeated three times in the function. It is
moved in the checkUnadoptedRepositories function and a unit test is
added to verify it works as expected.
A unit test is added to verify the total count returned by
ListUnadoptedRepositories is as expected.
Signed-off-by: singuliere <singuliere@autistici.org>