Add Tests

Adds tests. Increases test coverage from 30% to 70% :smile_cat: 
What would the `json` parameter contain in this case? Without reviewing the code more thoroughly this method seems like it would simply create an object from `json` then set the same properties again.