// Path: mock/src/main/java/me/chanjar/common/Bar.java
// public interface Bar {
// 
//   Set<String> getAllCodes();
// 
// }
// 
// Path: mock/src/main/java/me/chanjar/common/FooImpl.java
// @Component
// public class FooImpl implements Foo {
// 
//   private Bar bar;
// 
//   @Override
//   public boolean checkCodeDuplicate(String code) {
//     return bar.getAllCodes().contains(code);
//   }
// 
//   @Autowired
//   public void setBar(Bar bar) {
//     this.bar = bar;
//   }
// 
// }


import me.chanjar.common.Bar;
import me.chanjar.common.FooImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.Test;
import java.util.Collections;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
package me.chanjar.spring2;




@ContextConfiguration(classes = { FooImpl.class, LooImpl.class })
@TestExecutionListeners(listeners = MockitoTestExecutionListener.class)
// Path: mock/src/main/java/me/chanjar/common/Bar.java
// public interface Bar {
// 
//   Set<String> getAllCodes();
// 
// }
// 
// Path: mock/src/main/java/me/chanjar/common/FooImpl.java
// @Component
// public class FooImpl implements Foo {
// 
//   private Bar bar;
// 
//   @Override
//   public boolean checkCodeDuplicate(String code) {
//     return bar.getAllCodes().contains(code);
//   }
// 
//   @Autowired
//   public void setBar(Bar bar) {
//     this.bar = bar;
//   }
// 
// }


// Path: mock/src/test/java/me/chanjar/spring2/Spring_2_Test.java
import me.chanjar.common.Bar;
import me.chanjar.common.FooImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.Test;
import java.util.Collections;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;

package me.chanjar.spring2;




@ContextConfiguration(classes = { FooImpl.class, LooImpl.class })
@TestExecutionListeners(listeners = MockitoTestExecutionListener.class)
public class Spring_2_Test extends AbstractTestNGSpringContextTests {