1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.surefire.report;
20
21 import java.io.File;
22
23
24
25
26 @SuppressWarnings("UnusedDeclaration")
27 public class ATestClass {
28
29 public void failInAssert() {
30 throw new AssertionError("X is not Z");
31 }
32
33 public void nestedFailInAssert() {
34 failInAssert();
35 }
36
37 public void npe() {
38 throw new NullPointerException("It was null");
39 }
40
41 public void nestedNpe() {
42 npe();
43 }
44
45 public void npeOutsideTest() {
46 File file = new File((String) null);
47 }
48
49 public void nestedNpeOutsideTest() {
50 npeOutsideTest();
51 }
52
53 public void aLongTestErrorMessage() {
54 throw new RuntimeException("This message won't be truncated, somewhere over the rainbow. "
55 + "Gangnam style, Gangnam style, Gangnam style, , Gangnam style, Gangnam style");
56 }
57
58 public void aMockedException() {
59 throw new SomeMockedException();
60 }
61 }