Add ToBinary test