### Question:
LuceneDocumentStructure { public static Document documentRepresentingProperties( long nodeId, Value... values ) { DocWithId document = reuseDocument( nodeId ); document.setValues( values ); return document.document; } private  LuceneDocumentStructure(); static Document documentRepresentingProperties( long nodeId, Value... values ); static String encodedStringValuesForSampling( Value... values ); static MatchAllDocsQuery newScanQuery(); static Query newSeekQuery( Value... values ); static NumericRangeQuery<Double> newInclusiveNumericRangeSeekQuery( Number lower, Number upper ); static Query newRangeSeekByStringQuery( String lower, boolean includeLower,
            String upper, boolean includeUpper ); static Query newWildCardStringQuery( String searchFor ); static Query newRangeSeekByPrefixQuery( String prefix ); static Query newSuffixStringQuery( String suffix ); static Term newTermForChangeOrRemove( long nodeId ); static long getNodeId( Document from ); static TermsEnum originalTerms( Terms terms, String fieldKey ); static Field encodeValueField( Value value ); static boolean useFieldForUniquenessVerification( String fieldName ); static final String NODE_ID_KEY; static final String DELIMITER; }### Answer:
@Test void stringWithMaximumLengthShouldBeAllowed() { String longestString = RandomStringUtils.randomAscii( IndexWriter.MAX_TERM_LENGTH ); Document document = documentRepresentingProperties( (long) 123, longestString ); assertEquals( longestString, document.getField( String.key( 0 ) ).stringValue() ); }
@Test void shouldBuildDocumentRepresentingStringProperty() { Document document = documentRepresentingProperties( (long) 123, "hello" ); assertEquals( "123", document.get( NODE_ID_KEY ) ); assertEquals( "hello", document.get( String.key( 0 ) ) ); }
@Test void shouldBuildDocumentRepresentingMultipleStringProperties() { String[] values = new String[]{"hello", "world"}; Document document = documentRepresentingProperties( 123, values ); assertEquals( "123", document.get( NODE_ID_KEY ) ); assertThat( document.get( String.key( 0 ) ), equalTo( values[0] ) ); assertThat( document.get( String.key( 1 ) ), equalTo( values[1] ) ); }
@Test void shouldBuildDocumentRepresentingMultiplePropertiesOfDifferentTypes() { Object[] values = new Object[]{"hello", 789}; Document document = documentRepresentingProperties( 123, values ); assertEquals( "123", document.get( NODE_ID_KEY ) ); assertThat( document.get( String.key( 0 ) ), equalTo( "hello" ) ); assertThat( document.get( Number.key( 1 ) ), equalTo( "789.0" ) ); }
@Test void shouldBuildDocumentRepresentingBoolProperty() { Document document = documentRepresentingProperties( (long) 123, true ); assertEquals( "123", document.get( NODE_ID_KEY ) ); assertEquals( "true", document.get( Bool.key( 0 ) ) ); }
@Test void shouldBuildDocumentRepresentingNumberProperty() { Document document = documentRepresentingProperties( (long) 123, 12 ); assertEquals( "123", document.get( NODE_ID_KEY ) ); assertEquals( 12.0, document.getField( Number.key( 0 ) ).numericValue().doubleValue(), 0.001 ); }
@Test void shouldBuildDocumentRepresentingArrayProperty() { Document document = documentRepresentingProperties( (long) 123, new Object[]{new Integer[]{1, 2, 3}} ); assertEquals( "123", document.get( NODE_ID_KEY ) ); assertEquals( "D1.0|2.0|3.0|", document.get( Array.key( 0 ) ) ); }