Add some tests and a null check for xml resonses feature