core: consolidate unit tests into core_test.go