public static BasicAuthRuleHandle newInstance(final String handleJson) {
        if (Objects.isNull(handleJson)) {
            return null;
        }
        Map<String, Object> handleMap = GsonUtils.getInstance().convertToMap(handleJson);
        String handleType = null;
        if (Objects.nonNull(handleMap)) {
            handleType = handleMap.getOrDefault("handleType", "default").toString();
        }
        BasicAuthAuthenticationStrategy basicAuthAuthenticationStrategy1 = BasicAuthAuthenticationStrategyFactory.newInstance(handleType);
        BasicAuthRuleHandle basicAuthRuleHandle = basicAuthAuthenticationStrategy1.parseHandleJson(handleJson);
        basicAuthRuleHandle.setBasicAuthAuthenticationStrategy(basicAuthAuthenticationStrategy1);
        return basicAuthRuleHandle;
    }
@Test
    public void testGetInstance() {
        assertThat(BasicAuthRuleHandle.newInstance(null), nullValue());

        assertThat(BasicAuthRuleHandle.newInstance("{\"handleType\":\"custom\"}"),
                isA(CustomBasicAuthRuleHandle.class));

        assertThat(BasicAuthRuleHandle.newInstance("{\"authorization\":\"test:test123\"}"),
                isA(DefaultBasicAuthRuleHandle.class));
    }