"There He set for them a statute and an ordinance" (Exodus 15:25). This refers to the honoring of father and mother; these are the words of Rabbi Yehoshua. And Rabbi Elazar of Modi'in says: "statute" refers to the laws of forbidden unions, as it is said, "that you do not commit any of these abominable customs" (Leviticus 18:30); and "ordinance" refers to punishments, and the laws of fines, and the laws of damages. "And there He tested him" (Exodus 15:25). "There He raised him to greatness," these are the words of Rabbi Yehoshua, as it is said, "[Evil-merodach] lifted up the head of Jehoiachin king of Judah" (II Kings 25:27), and it says, "Lift up the head of the sons of Gershon" (Numbers 4:22). Rabbi Elazar of Modi'in said to him: But greatness depends only on a shin [in the word meaning to lift], and here it is written only with a samekh; then what does Scripture teach by saying "and there He tested him"? There the Omnipresent tested Israel.
Statute and Ordinance at Marah and the Test of Israel
Yalkut Shimoni on Torah 257:2
שָׁם שָׂם לוֹ חֹק וּמִשְׁפָּט. זֶה כִּבּוּד אָב וָאֵם, דִּבְרֵי רַבִּי יְהוֹשֻׁעַ. וְרַבִּי אֶלְעָזָר הַמּוֹדָעִי אוֹמֵר, חֹק, אֵלּוּ עֲרָיוֹת, שֶׁנֶּאֱמַר "לְבִלְתִּי עֲשׂוֹת מֵחֻקּוֹת הַתּוֹעֵבֹת", וּמִשְׁפָּט, אֵלּוּ עוֹנָשִׁין וְדִינֵי קְנָסוֹת וְדִינֵי חַבָּלוֹת. וְשָׁם נִסָּהוּ. שָׁם נָשָׂא לוֹ גְּדוּלָה דִּבְרֵי רַבִּי יְהוֹשֻׁעַ, שֶׁנֶּאֱמַר (מלכים ב כה, כז) "נָשָׂא אֱוִיל מֵרֹדָךְ אֶת רֹאשׁ יְהוֹיָכִין מֶלֶךְ יְהוּדָה". וְאוֹמֵר (במדבר ד, כב) "נָשֹׂא אֶת רֹאשׁ בְּנֵי גֵרְשׁוֹן". אָמַר לוֹ רַבִּי אֶלְעָזָר הַמּוֹדָעִי, וַהֲלֹא גְּדוּלָּה אֵינָהּ תְּלוּיָה אֶלָּא בְּשִׁי"ן, וְכַאן לֹא כְּתִיב אֶלָּא בְּסָמֶ"ךְ, הָא מַה תַּלְמוּד לוֹמַר וְשָׁם נִסָּהוּ, שָׁם נִסָּה הַמָּקוֹם אֶת יִשְׂרָאֵל.