@Deployment Unit Test annotation does not support ProcessApplication deployments (only classpath)

related to Unit Testing: External Scripts: "deployment://file.js" Cannot find resource at path

The current @Deployment annotation: https://docs.camunda.org/javadoc/camunda-bpm-platform/7.8/, seems to only support classPath deployment resources. This is a problem because the resource name is not configurable in a classpath resource:

example:

Deployment Builder: https://docs.camunda.org/javadoc/camunda-bpm-platform/7.8/org/camunda/bpm/engine/repository/DeploymentBuilder.html
When using the deployment builder and you add the resource as a string or inputstream, you get the option to add a resource name: https://docs.camunda.org/javadoc/camunda-bpm-platform/7.8/org/camunda/bpm/engine/repository/DeploymentBuilder.html#addString(java.lang.String,%20java.lang.String)

But when we use the deployment annotation there is no option for this, and this breaks the ability to easily test shared engine deployment configurations where deployments are made through the Rest API.

@thorben do you have a recommendation on a solution for this? I was thinking something like the deployment annotation could support a array of maps rather than just a array of strings.

@Deployment(resources = [['myfileName':'path/to/myFileName.extension'], ['...':'...']] )

My current work around is to not use the deployment annotation and just do a manula deployment and teardown, but this seems really unnecessary for what seems to be a basic fix? Any complications that you foresee?

Thanks!