remove cast(long) in unittest