@SuppressFBWarnings(value = "NP_NONNULL_PARAM_VIOLATION", justification = "Test that it works properly if null ;-)")
@Test
public void testCheckNotNullShouldThrowNullPointerExceptionWithGivenMessageStringIfObjectIsNull() {

    // Given:
    String errorMessage = "error message";
    expectedException.expect(NullPointerException.class);
    expectedException.expectMessage(errorMessage);
    // When:
    Preconditions.checkNotNull(null, errorMessage);
    // Then: expect exception
}