I'm having some trouble making Kotlin and EasyMock play nice with each other.
I have a test containing something like this:
expect(foo.createClassLoader(aryEq(arrayOf("foo.jar")))).andReturn(classLoader)
(where foo
is a mock object)
However, this throws java.lang.IllegalStateException: aryEq(arrayOf("foo.jar")) must not be null
because my createClassLoader
method doesn't accept a nullable array, and for some reason EasyMock.aryEq
returns null:
public static <T> T[] aryEq(final T[] value) {
reportMatcher(new ArrayEquals(value));
return null;
}
Is there any way out of this?