public void ensureCollection(StructuredType entityType) throws ODataException {
        List<String> missingCollectionPropertyName = new ArrayList<>();

        entityType.getStructuralProperties().stream()
                .filter(property -> (property.isCollection())
                        && !(property instanceof NavigationProperty) && !property.isNullable()).forEach(property -> {
            LOG.debug("Validating non-nullable collection property : {}", property.getName());
            if (!fields.containsKey(property.getName())) {
                missingCollectionPropertyName.add(property.getName());
            }
        });
        if (missingCollectionPropertyName.size() != 0) {
            StringJoiner joiner = new StringJoiner(",");
            missingCollectionPropertyName.forEach(joiner::add);
            throw new ODataUnmarshallingException("The request does not specify the non-nullable collections: '"
                    + joiner.toString() + ".");
        }

    }
public void ensureCollection ( StructuredType entityType ) throws ODataException { List < String > missingCollectionPropertyName = new ArrayList < > ( ) ; entityType . getStructuralProperties ( ) . stream ( ) . filter ( property -> ( property . isCollection ( ) ) && ! ( property instanceof NavigationProperty ) && ! property . isNullable ( ) ) . forEach ( property -> { LOG . debug ( "Validating non-nullable collection property : {}" , property . getName ( ) ) ; if ( ! fields . containsKey ( property . getName ( ) ) ) { missingCollectionPropertyName . add ( property . getName ( ) ) ; } } ) ; if ( missingCollectionPropertyName . size ( ) != 0 ) { StringJoiner joiner = new StringJoiner ( "," ) ; missingCollectionPropertyName . forEach ( joiner :: add ) ; throw new ODataUnmarshallingException ( "The request does not specify the non-nullable collections: '" + joiner . toString ( ) + "." ) ; } }
Ensure that non nullable collection are present.

@param entityType entityType
@throws ODataException If unable to ensure collection is present