Import test infrastructure from json-glib, add a test case