AnsweredAssumed Answered

MVN amp project JUNIT test fails with init error

Question asked by mxc on Apr 2, 2014
Latest reply on Apr 3, 2014 by mxc
Hi there,

I have used the DemoComponenet test as a basis to build a JUNIT test. However when I run the test I get:

java.lang.RuntimeException: Unable to create instanceof class org.springframework.test.context.junit4.SpringJUnit4ClassRunner
   at com.tradeshift.test.remote.internal.Utils.createRunner(
   at com.tradeshift.test.remote.RemoteTestRunner.<init>(

Caused by: java.lang.reflect.InvocationTargetException: null
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(

I am not sure where the unit test picks up the spring application context because it does not appear to be anywhere in the project. Although the DemoComponent test runs fine without it. There appears to be no test specific resources in the project created by the mvn plugin.

@Remote(runnerClass = SpringJUnit4ClassRunner.class)

Any help appreciated.