static void register(String type, Class<?> clazz) {
        if (Modifier.isAbstract(clazz.getModifiers())) {
            return;
        }
        if (REGISTRY_REQUEST.containsKey(type)) {
            throw new RuntimeException(String.format("Fail to register, type:%s ,clazz:%s ", type, clazz.getName()));
        }
        REGISTRY_REQUEST.put(type, clazz);
    }
@Test
    void testRegisterDuplicated() {
        assertThrows(RuntimeException.class, () -> {
            PayloadRegistry.register("ErrorResponse", ErrorResponse.class);
        });
    }