public static boolean checkIfUseGeneric(ConsumerConfig consumerConfig) {
        Class proxyClass = consumerConfig.getProxyClass();
        Class enclosingClass = proxyClass.getEnclosingClass();
        if (enclosingClass != null) {
            try {
                enclosingClass.getDeclaredMethod("getSofaStub", Channel.class, CallOptions.class, int.class);
                return false;
            } catch (NoSuchMethodException e) {
                //ignore
                return true;
            }
        }

        return true;
    }
@Test
    public void testCheckIfUseGeneric() {
        ConsumerConfig asTrue = new ConsumerConfig();
        asTrue.setInterfaceId(NeedGeneric.NeedGenericInterface.class.getName());
        ConsumerConfig asFalse = new ConsumerConfig();
        asFalse.setInterfaceId(DoNotNeedGeneric.NoNotNeedGenericInterface.class.getName());

        Assert.assertTrue(SofaProtoUtils.checkIfUseGeneric(asTrue));
        Assert.assertFalse(SofaProtoUtils.checkIfUseGeneric(asFalse));

    }