Added JsonUtils tests and refactor