Added unittests for core.