TypeToken { static <T> TypeToken<T> fromValue(T value) { return new TypeToken<T>(value.getClass()) { }; } TypeToken(); private  TypeToken(Class<?> classOfT); Type getType();  }
@Test(expected = NullPointerException.class) public void testShouldThrowNullPointerExceptionForNullClassOfTInFromValueMethod() { TypeToken.fromValue(null); }