Instantiating Gradle build objects from a plugin Unit test

Hi there! I have a Gradle plugin that operates on org.gradle.api.publish.maven.MavenPublication objects. I need to test its behavior, so I need to instantiate a MavenPublication object. I see that there is an implementation org.gradle.api.publish.maven.internal.publication.DefaultMavenPublication, but its constructor has too many parameters, and I suppose there should be some factory or DI container that will help me to accomplish objects obtaining. Can you suggest me something (except for functional testing)?