@Test public void testDependency_UnMockBean() { new Expectations() { { when(springBeanService2.getDependency1()).thenReturn(dependency2); when(springBeanService2.getDependency2()).thenReturn(dependency2); } }; want.object(springBeanService2.getDependency1()).notNull(); want.object(springBeanService2.getDependency2()).notNull(); }
public void testDependency_MockBean() { want.object(springBeanService1.getDependency1()).notNull(); want.object(springBeanService1.getDependency2()).notNull(); }