SERVER-991 SERVER-8008 Fixed test to use $slice instead of $trimTo.