1 package test.guice; 2 3 import com.google.inject.Inject; 4 5 import org.testng.annotations.Guice; 6 import org.testng.annotations.Test; 7 8 import test.SimpleBaseTest; 9 10 @Guice(modules = GuiceExampleModule.class) 11 public class Guice2Test extends SimpleBaseTest { 12 static ISingleton m_object; 13 14 @Inject 15 ISingleton m_singleton; 16 17 @Test singletonShouldWork()18 public void singletonShouldWork() { 19 m_object = m_singleton; 20 } 21 22 } 23