[#1386] Fix bug when creating multiple sysadmins
[#1386] Add basic tests for the factories

These tests are very simple: try to create two objects using each factory, but
they already helped me find some bugs (fixed in this commit).

This also guarantees that we can safely call each factory with no parameters,
and they're not reusing unique variables (like was the case for the Sysadmin).