add unit tests to testCoerceStringToPrimitive