1 package test.configurationfailurepolicy;
2 
3 import org.testng.annotations.BeforeMethod;
4 import org.testng.annotations.Test;
5 
6 public class ClassWithFailedBeforeMethodAndMultipleTests {
7 
8   @BeforeMethod
setupShouldFail()9   public void setupShouldFail() {
10     throw new RuntimeException("Failing in setUp");
11   }
12 
13   @Test
test1()14   public void test1() {
15 
16   }
17 
18   @Test
test2()19   public void test2() {
20 
21   }
22 }
23