question: private void checkRequiredFields ( SimpleObject simpleObject , String [ ] requiredFields ) { List < String > missingFields = new ArrayList < > ( ) ; for ( String requiredField : requiredFields ) { if ( ! simpleObject . containsKey ( requiredField ) ) { missingFields . add ( requiredField ) ; } } if ( ! missingFields . isEmpty ( ) ) { throw new InvalidObjectDataException ( "JSON object lacks required fields: " + StringUtils . join ( missingFields , "," ) ) ; } }
target:  Throws an exception if the given SimpleObject is missing any required fields. 