Added test for NamespaceManager.
Added tests for EnvironmentFactory.