### Question:
Preconditions { public static <T> T checkNotNull(T reference) { if (reference == null) { throw new NullPointerException(); } return reference; } private  Preconditions(); static void checkArgument(boolean expression); static void checkArgument(boolean expression,
            @Nullable
            Object errorMessage); static void checkArgument(boolean expression,
            @Nullable
            String errorMessageTemplate,
            @Nullable
            Object... errorMessageArgs); static void checkState(boolean expression); static void checkState(boolean expression,
            @Nullable
            Object errorMessage); static void checkState(boolean expression,
            @Nullable
            String errorMessageTemplate,
            @Nullable
            Object... errorMessageArgs); static T checkNotNull(T reference); static T checkNotNull(T reference, @Nullable
    Object errorMessage); static T checkNotNull(T reference,
            @Nullable
            String errorMessageTemplate,
            @Nullable
            Object... errorMessageArgs); static int checkElementIndex(int index, int size); static int checkElementIndex(int index, int size,
            @Nullable
            String desc); static int checkPositionIndex(int index, int size); static int checkPositionIndex(int index, int size,
            @Nullable
            String desc); static void checkPositionIndexes(int start, int end, int size);  }### Answer:
@Test public void testNotNulls() { Preconditions.checkNotNull(msgObject); Preconditions.checkNotNull(msgObject, msgObject); Preconditions.checkNotNull(msgObject, "one %s two%s", msgObject, msgObject); }
@Test(expected = NullPointerException.class) public void testFalseNotNull() { Preconditions.checkNotNull(null); }
@Test(expected = NullPointerException.class) public void testFalseNotNullSingleMessage() { Preconditions.checkNotNull(null, msgObject); }
@Test(expected = NullPointerException.class) public void testFalseNotNullMultiMessage() { Preconditions.checkNotNull(null, "one %s two%s", msgObject, msgObject); }