public static Object cast(Class<?> clazz, Object value) {
        try {
            return clazz.cast(value);
        } catch (ClassCastException e) {
            return null;
        }
    }
@Test
    public void castTest() {
        TestClass testClass = new TestSubClass();
        Object cast = ReflectUtil.cast(TestSubClass.class, testClass);
        Assert.assertTrue(cast instanceof TestSubClass);
    }