Unit test manager

Some unit test for the manager package. I also added several mock structs and helper functions for test purpose.
We should do that here :) As in, check the subcontainers here.