use Util.prettyPrintXml() to print entities to logger
Merge pull request #298 from rostafiychuk/prettyXml

use Util.prettyPrintXml() to print entities to logger
timeouts removed or replaced with more suitable code
refactored
unused import removed
hardcoded timeouts removed or replaced (tests with varying behaviour)