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