1package com.google.example;
2
3import com.google.common.base.Preconditions;
4
5import org.junit.runner.RunWith;
6import org.junit.runners.JUnit4;
7
8import java.util.List;
9import java.util.Set;
10
11import javax.annotation.Nullable;
12
13import static org.junit.Assert.fail;
14import static com.google.truth.Truth.assertThat;
15
16@RunWith( JUnit4.class ) public class SomeTest  {
17
18  <T> void check(@Nullable List<T> x) {
19    Preconditions.checkNodeNull(x);
20  }
21
22  void f() {
23    List<String> xs = null;
24    assertThat(xs).isNull();
25    try {
26      check(xs);
27      fail();
28    } catch (NullPointerException e) {
29    }
30  }
31}
32