Improve AssetsManager and its test case