Unit test manager

Some unit test for the manager package. I also added several mock structs and helper functions for test purpose.
Any way that we can assert that the subcontainers are now tracked?