+ def 'Create a schema set from a yang file that is greater than 1MB.'() {
+ given: 'a yang file greater than 1MB'
+ def multipartFile = createMultipartFileFromResource("/model-over-1mb.yang")
+ and: 'an endpoint'
+ def schemaSetEndpoint = "$basePath/v1/dataspaces/$dataspaceName/schema-sets"
+ when: 'a file is uploaded to the create schema set endpoint'
+ def response =
+ mvc.perform(
+ multipart(schemaSetEndpoint)
+ .file(multipartFile)
+ .param('schema-set-name', schemaSetName))
+ .andReturn().response
+ then: 'the associated service method is invoked'
+ 1 * mockCpsModuleService.createSchemaSet(dataspaceName, schemaSetName, _)
+ and: 'the response code indicates success'
+ response.status == HttpStatus.CREATED.value()
+ }
+