public class MyServiceImplTest {
private MyService myService = new MyServiceImpl();
@Test
public void testSomeMethod() {
assertEquals("something", myService.someMethod());
}
}
Why inject the bean in your test rather than creating an instance by yourself?