add scala for loop test case