@@ -326,14 +326,20 @@ void standardFieldTypes_mustExposeObjectListFieldValues() throws IOException {
326326 SimpleField itemSubfield1 = itemSubFields .getSimpleField ("subfield_1" );
327327 assertInstanceOf (String .class , itemSubfield1 .getValue ());
328328 for (Map .Entry <String , SimpleField > entry : itemFields .entrySet ()) {
329+ String fieldName = entry .getKey ();
329330 SimpleField subfield = entry .getValue ();
330- assertEquals ( subfield . getValue () , subfield . getStringValue () );
331+ testObjectSubField ( fieldName , subfield );
331332 }
332333 }
333334
334335 assertThrows (IllegalStateException .class , listField ::getSimpleItems );
335336 }
336337
338+ private void testObjectSubField (String fieldName , SimpleField subField ) {
339+ assertTrue (fieldName .startsWith ("subfield_" ));
340+ assertEquals (subField .getValue (), subField .getStringValue ());
341+ }
342+
337343 @ Test
338344 @ DisplayName ("simple / object / list variants must be recognised" )
339345 void standardFieldTypes_mustExposeObjectFieldValues () throws IOException {
@@ -354,6 +360,7 @@ void standardFieldTypes_mustExposeObjectFieldValues() throws IOException {
354360 for (Map .Entry <String , DynamicField > entry : subFieldsDynamic .entrySet ()) {
355361 String fieldName = entry .getKey ();
356362 SimpleField subField = entry .getValue ().getSimpleField ();
363+ testObjectSubField (fieldName , subField );
357364 }
358365
359366 LinkedHashMap <String , SimpleField > subFieldsSimple = fieldObject .getSimpleFields ();
@@ -363,6 +370,7 @@ void standardFieldTypes_mustExposeObjectFieldValues() throws IOException {
363370 for (Map .Entry <String , SimpleField > entry : subFieldsSimple .entrySet ()) {
364371 String fieldName = entry .getKey ();
365372 SimpleField subField = entry .getValue ();
373+ testObjectSubField (fieldName , subField );
366374 }
367375 }
368376 }
0 commit comments