Added some more tests for RestApi class and fixed some bugs in the addDataType, addDataTypes and the constructor.