fixed bad cast for unit test

fixed bad cast for unit test. result from merge.