I have the following class:
@Component
public class MyClass {
@Autowired MyPojo pojo;
}
How do i test it without mocking the injected beans? I do not have a configuration [XML or declarative]. I have done the following:
@RunWith(SpringJUnit4ClassRunner.class)
@ComponentScan
public class MyClassTest {
@Autowired MyClass myClass;
@Test
public void test() {
this.myClass...()
}
}