@@ -472,7 +472,7 @@ void rawTexts_mustBeAccessible() throws IOException {
472472 assertFalse (activeOptions .getPolygon ());
473473 assertFalse (activeOptions .getConfidence ());
474474 assertFalse (activeOptions .getTextContext ());
475- assertFalse (activeOptions .getDataSchema ().getOverride ());
475+ assertFalse (activeOptions .getDataSchema ().getReplace ());
476476
477477 assertNull (inference .getResult ().getRag ());
478478
@@ -526,8 +526,8 @@ class RstDisplay {
526526 void rstDisplay_mustBeAccessible () throws IOException {
527527 InferenceResponse resp = loadInference ("inference/standard_field_types.json" );
528528 String rstRef = readFileAsString ("inference/standard_field_types.rst" );
529- Inference inf = resp .getInference ();
530- assertNotNull (inf );
529+ Inference inference = resp .getInference ();
530+ assertNotNull (inference );
531531 assertEquals (rstRef , resp .getInference ().toString ());
532532 }
533533 }
@@ -539,9 +539,28 @@ class TextContextTest {
539539 @ DisplayName ("should be present and true when enabled" )
540540 void textContext_mustBePresentAndTrue () throws IOException {
541541 InferenceResponse resp = loadInference ("inference/text_context_enabled.json" );
542- Inference inf = resp .getInference ();
543- assertNotNull (inf );
544- assertTrue (inf .getActiveOptions ().getTextContext ());
542+ Inference inference = resp .getInference ();
543+ assertNotNull (inference );
544+ assertTrue (inference .getActiveOptions ().getTextContext ());
545+ }
546+ }
547+
548+ @ Nested
549+ @ DisplayName ("Data Schema Return" )
550+ class DataSchemaTest {
551+ @ Test
552+ @ DisplayName ("should be present and true when enabled" )
553+ void textContext_mustBePresentAndTrue () throws IOException {
554+ InferenceResponse resp = loadInference ("inference/data_schema_replace.json" );
555+ Inference inference = resp .getInference ();
556+ assertNotNull (inference );
557+ InferenceFields fields = inference .getResult ().getFields ();
558+ assertEquals (
559+ "a test value" ,
560+ fields .get ("test_replace" ).getSimpleField ().getStringValue ()
561+ );
562+
563+ assertTrue (inference .getActiveOptions ().getDataSchema ().getReplace ());
545564 }
546565 }
547566}
0 commit comments