summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/common/xcontent/XContentFactoryTests.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/test/java/org/elasticsearch/common/xcontent/XContentFactoryTests.java')
-rw-r--r--core/src/test/java/org/elasticsearch/common/xcontent/XContentFactoryTests.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/src/test/java/org/elasticsearch/common/xcontent/XContentFactoryTests.java b/core/src/test/java/org/elasticsearch/common/xcontent/XContentFactoryTests.java
index 7489ea8f9d..9b1cfb6457 100644
--- a/core/src/test/java/org/elasticsearch/common/xcontent/XContentFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/common/xcontent/XContentFactoryTests.java
@@ -21,7 +21,6 @@ package org.elasticsearch.common.xcontent;
import com.fasterxml.jackson.dataformat.cbor.CBORConstants;
import com.fasterxml.jackson.dataformat.smile.SmileConstants;
-
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.test.ESTestCase;
@@ -97,17 +96,17 @@ public class XContentFactoryTests extends ESTestCase {
is = new ByteArrayInputStream(new byte[] {(byte) 1});
assertNull(XContentFactory.xContentType(is));
}
-
+
public void testJsonFromBytesOptionallyPrecededByUtf8Bom() throws Exception {
byte[] bytes = new byte[] {(byte) '{', (byte) '}'};
assertThat(XContentFactory.xContentType(bytes), equalTo(XContentType.JSON));
-
+
bytes = new byte[] {(byte) 0x20, (byte) '{', (byte) '}'};
assertThat(XContentFactory.xContentType(bytes), equalTo(XContentType.JSON));
-
+
bytes = new byte[] {(byte) 0xef, (byte) 0xbb, (byte) 0xbf, (byte) '{', (byte) '}'};
assertThat(XContentFactory.xContentType(bytes), equalTo(XContentType.JSON));
-
+
bytes = new byte[] {(byte) 0xef, (byte) 0xbb, (byte) 0xbf, (byte) 0x20, (byte) '{', (byte) '}'};
assertThat(XContentFactory.xContentType(bytes), equalTo(XContentType.JSON));
}