1 package test.factory; 2 3 import org.testng.annotations.Factory; 4 import org.testng.annotations.Test; 5 6 public class FactoryFailureSampleTest { 7 8 @Factory 9 public Object[] factory() { 10 throw new NullPointerException(); 11 } 12 13 @Test 14 public void f() { 15 } 16 } 17