diff --git a/src/test/java/com/jcabi/xml/XMLDocumentTest.java b/src/test/java/com/jcabi/xml/XMLDocumentTest.java
index 2d7c3b7..4ef6d96 100644
--- a/src/test/java/com/jcabi/xml/XMLDocumentTest.java
+++ b/src/test/java/com/jcabi/xml/XMLDocumentTest.java
@@ -428,4 +428,19 @@ void extractsNodesFromPom() throws Exception {
Matchers.hasSize(2)
);
}
+
+ @Test
+ void stripsUnnecessaryWhiteSpacesWhileParsing() {
+ MatcherAssert.assertThat(
+ new XMLDocument(
+ "\n hello\n".getBytes()
+ ),
+ Matchers.equalTo(
+ new XMLDocument(
+ " \n hello \n ".getBytes()
+ )
+ )
+ );
+ }
+
}