ScalaMock
ScalaMock copied to clipboard
Compilation error on mocking java class with varargs constructor
ScalaMock Version 4.1.0
Scala Version 2.12
Runtime JVM
Please describe the expected behavior of the issue
trying to stub/mock a java class which accepts varargs in a constructor should work
Please provide a description of what actually happens
But compilation fails with the following message
[error] found : String*
[error] required: String
[error] val site = stub[MyClass]
[error] ^
Reproducible Test Case
public class MyClass {
public MyClass(String... varargs) {
}
}
test("my failing test") {
val s = stub[MyClass]
}