@Test
    public void testWritingOfTensorFieldValueWithoutTensor() throws IOException {
        DocumentType documentTypeWithTensor = types.getDocumentType("testtensor");
        String docId = "id:unittest:testtensor::0";
        Document doc = new Document(documentTypeWithTensor, docId);
        Field tensorField = documentTypeWithTensor.getField("tensorfield");
        doc.setFieldValue(tensorField, new TensorFieldValue(((TensorDataType)tensorField.getDataType()).getTensorType()));
        assertEqualJson(asDocument(docId, "{ \"tensorfield\": {} }"), JsonWriter.toByteArray(doc));
    }
Functional tests for com.yahoo.document.json.JsonWriter.

@author Steinar Knutsen
document/src/test/java/com/yahoo/document/json/JsonWriterTestCase.java