public S setMockMode(String mockMode) {
        this.mockMode = mockMode;
        if (StringUtils.equals(mockMode, MockMode.LOCAL) ||
            StringUtils.equals(mockMode, MockMode.REMOTE)) {
            this.setMock(true);
        }
        return castThis();
    }
Is validation boolean.

@return the boolean
core/api/src/main/java/com/alipay/sofa/rpc/config/AbstractInterfaceConfig.java