Added junit tests. Fixed old code in IntegerDirection to match the newer
StringDirection logic