add from_json unit test
add unit test to from_file