writing test for addLineInJson