RxViper { static <T> T requireNotNull(T arg) { if (arg == null) { throw new IllegalArgumentException("Argument can not be null"); } return arg; } private  RxViper();   }
@Test public void requiredArgShouldBeTheSame() { final Object actual = new Object(); final Object expected = RxViper.requireNotNull(actual); assertThat(actual).isSameAs(expected); }
@Test public void requiredArgShouldNotBeNull() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Argument can not be null"); RxViper.requireNotNull(null); }