Add test for l2 minimization.