class CollectionModelContentConverter implements ModelConverter {

	/**
	 * The Link relation provider.
	 */
	private final LinkRelationProvider linkRelationProvider;

	/**
	 * Instantiates a new Collection model content converter.
	 *
	 * @param linkRelationProvider the link relation provider
	 */
	public CollectionModelContentConverter(LinkRelationProvider linkRelationProvider) {
		this.linkRelationProvider = linkRelationProvider;
	}

	@Override
	public Schema<?> resolve(AnnotatedType type, ModelConverterContext context, Iterator<ModelConverter> chain) {<FILL_FUNCTION_BODY>}

	/**
	 * Gets entity type.
	 *
	 * @param type the type   
	 * @return the entity type
	 */
	private Class<?> getEntityType(AnnotatedType type) {
		Class<?> containerEntityType = ((CollectionType) (type.getType())).getContentType().getRawClass();
		if (EntityModel.class.isAssignableFrom(containerEntityType)) {
			TypeBindings typeBindings = ((CollectionType) type.getType()).getContentType().getBindings();
			if (!CollectionUtils.isEmpty(typeBindings.getTypeParameters()))
				return typeBindings.getBoundType(0).getRawClass();
		}
		return containerEntityType;
	}
}

		if (chain.hasNext() && type != null && type.getType() instanceof CollectionType
				&& "_embedded".equalsIgnoreCase(type.getPropertyName())) {
			Schema<?> schema = chain.next().resolve(type, context, chain);
			if (schema instanceof ArraySchema) {
				Class<?> entityType = getEntityType(type);
				String entityClassName = linkRelationProvider.getCollectionResourceRelFor(entityType).value();

				return new ObjectSchema()
						.name("_embedded")
						.addProperties(entityClassName, schema);
			}
		}
		return chain.hasNext() ? chain.next().resolve(type, context, chain) : null;
	
<no_super_class>