@@ -47,7 +47,7 @@ public void testInheritedBean() throws Exception {
4747 assertEquals (cm .getAllOf ().get (0 ).get$ref (), "#/components/schemas/BaseBean" );
4848
4949 // make sure parent properties are filtered out of subclass
50- assertSub1PropertiesValid (cm .getProperties ());
50+ assertSub1PropertiesValid (cm .getAllOf (). get ( 1 ). getProperties ());
5151 }
5252
5353 @ Test
@@ -60,7 +60,7 @@ public void testInheritedChildBean() throws Exception {
6060 assertEquals (cm .getAllOf ().get (0 ).get$ref (), "#/components/schemas/BaseBean" );
6161
6262 // make sure parent properties are filtered out of subclass
63- assertSub1PropertiesValid (cm .getProperties ());
63+ assertSub1PropertiesValid (cm .getAllOf (). get ( 1 ). getProperties ());
6464
6565 final Schema baseModel = context .getDefinedModels ().get ("BaseBean" );
6666 assertNotNull (baseModel );
@@ -77,7 +77,7 @@ public void testComposedChildBean() throws Exception {
7777 assertEquals (cm .getAllOf ().get (0 ).get$ref (), "#/components/schemas/BaseBean2" );
7878
7979 // make sure parent properties are filtered out of subclass
80- assertSub1PropertiesValid (cm .getProperties ());
80+ assertSub1PropertiesValid (cm .getAllOf (). get ( 1 ). getProperties ());
8181
8282 final Schema baseModel = context .getDefinedModels ().get ("BaseBean2" );
8383 assertNotNull (baseModel );
@@ -119,7 +119,7 @@ public void testHierarchy() throws Exception {
119119 ComposedSchema cm = (ComposedSchema ) subModel ;
120120 assertEquals (cm .getAllOf ().get (0 ).get$ref (), "#/components/schemas/BaseBean3" );
121121 // make sure parent properties are filtered out of subclass
122- assertSub1PropertiesValid (cm .getProperties ());
122+ assertSub1PropertiesValid (cm .getAllOf (). get ( 1 ). getProperties ());
123123
124124 // assert grandchild
125125 final Schema subSubModel = context .getDefinedModels ().get ("GrandChildBean3" );
@@ -129,7 +129,7 @@ public void testHierarchy() throws Exception {
129129 cm = (ComposedSchema ) subSubModel ;
130130 assertEquals (cm .getAllOf ().get (0 ).get$ref (), "#/components/schemas/ChildBean3" );
131131 // make sure parent properties are filtered out of subclass
132- assertSub2PropertiesValid (cm .getProperties ());
132+ assertSub2PropertiesValid (cm .getAllOf (). get ( 1 ). getProperties ());
133133
134134 }
135135
@@ -310,15 +310,15 @@ public void testMultipleInheritedBean() throws Exception {
310310 ComposedSchema cm1 = (ComposedSchema ) sub1Model ;
311311 assertEquals (cm1 .getAllOf ().get (0 ).get$ref (), "#/components/schemas/MultipleBaseBean" );
312312 // make sure parent properties are filtered out of subclass
313- assertSub1PropertiesValid (cm1 .getProperties ());
313+ assertSub1PropertiesValid (cm1 .getAllOf (). get ( 1 ). getProperties ());
314314
315315 final Schema sub2Model = context .getDefinedModels ().get ("MultipleSub2Bean" );
316316 assertNotNull (sub2Model );
317317 assertTrue (sub2Model instanceof ComposedSchema );
318318 ComposedSchema cm2 = (ComposedSchema ) sub2Model ;
319319 assertEquals (cm2 .getAllOf ().get (0 ).get$ref (), "#/components/schemas/MultipleBaseBean" );
320320 // make sure parent properties are filtered out of subclass
321- assertSub2PropertiesValid (cm2 .getProperties ());
321+ assertSub2PropertiesValid (cm2 .getAllOf (). get ( 1 ). getProperties ());
322322 }
323323
324324 @ Test
@@ -330,7 +330,7 @@ public void testMultipleInheritedChildBean() throws Exception {
330330 ComposedSchema cm = (ComposedSchema ) subModel ;
331331 assertEquals (cm .getAllOf ().get (0 ).get$ref (), "#/components/schemas/MultipleBaseBean" );
332332 // make sure parent properties are filtered out of subclass
333- assertSub1PropertiesValid (cm .getProperties ());
333+ assertSub1PropertiesValid (cm .getAllOf (). get ( 1 ). getProperties ());
334334
335335 final Schema baseModel = context .getDefinedModels ().get ("MultipleBaseBean" );
336336 assertNotNull (baseModel );
@@ -343,15 +343,15 @@ public void testMultipleInheritedChildBean() throws Exception {
343343 ComposedSchema cm1 = (ComposedSchema ) sub1Model ;
344344 assertEquals (cm1 .getAllOf ().get (0 ).get$ref (), "#/components/schemas/MultipleBaseBean" );
345345 // make sure parent properties are filtered out of subclass
346- assertSub1PropertiesValid (cm1 .getProperties ());
346+ assertSub1PropertiesValid (cm1 .getAllOf (). get ( 1 ). getProperties ());
347347
348348 final Schema sub2Model = context .getDefinedModels ().get ("MultipleSub2Bean" );
349349 assertNotNull (sub2Model );
350350 assertTrue (sub2Model instanceof ComposedSchema );
351351 ComposedSchema cm2 = (ComposedSchema ) sub2Model ;
352352 assertEquals (cm2 .getAllOf ().get (0 ).get$ref (), "#/components/schemas/MultipleBaseBean" );
353353 // make sure parent properties are filtered out of subclass
354- assertSub2PropertiesValid (cm2 .getProperties ());
354+ assertSub2PropertiesValid (cm2 .getAllOf (). get ( 1 ). getProperties ());
355355 }
356356
357357 private void assertSub2PropertiesValid (Map <String , Schema > subProperties ) {
0 commit comments