Fixed bug in XML ApiResponse, added minimal unit test