test(toJson): missing new operator when invoking constructor