update test cases
add json gen helper