Unit tests, possibility to decode json into relevant type