MOBSDK-482: bug fix regarding custom types. Unit tests reinstated (and passing)