Added tests for min(i,j) and max(i,j)