private void sanityCheck ( IntermediateModel intermediateModel ) { sendEmptyQueryString . forEach ( ( shapeName , memberNames ) -> { ShapeModel shape = intermediateModel . getShapes ( ) . get ( shapeName ) ; if ( shape == null ) { throw new IllegalStateException ( String . format ( "Cannot find shape [%s] in the model when processing " + "customization config sendEmptyQueryStringParam.%s" , shapeName , shapeName ) ) ; } memberNames . forEach ( memberName -> { if ( shape . getMemberByName ( memberName ) == null ) { throw new IllegalStateException ( String . format ( "Cannot find member [%s] in the model when processing " + "customization config sendEmptyQueryStringParam.%s" , memberName , shapeName ) ) ; } } ) ; memberNames . stream ( ) . map ( shape :: getMemberByC2jName ) . forEach ( member -> assertIsListMember ( shapeName , member ) ) ; } ) ; }
Verify the shape exists and the members provided exist and also verify the members are list shapes .