@Override
    public TypeDefinition build(
            ProcessingEnvironment processingEnv, DeclaredType type, Map<String, TypeDefinition> typeCache) {
        TypeDefinition typeDefinition = new TypeDefinition(type.toString());
        // Generic Type arguments
        type.getTypeArguments().stream()
                .map(typeArgument -> TypeDefinitionBuilder.build(
                        processingEnv, typeArgument, typeCache)) // build the TypeDefinition from typeArgument
                .filter(Objects::nonNull)
                .map(TypeDefinition::getType)
                .forEach(typeDefinition.getItems()::add); // Add into the declared TypeDefinition
        return typeDefinition;
    }
@Test
    void testBuild() {

        buildAndAssertTypeDefinition(
                processingEnv,
                stringsField,
                "java.util.Map<java.lang.String,java.lang.String>",
                "java.lang.String",
                "java.lang.String",
                builder);

        buildAndAssertTypeDefinition(
                processingEnv,
                colorsField,
                "java.util.SortedMap<java.lang.String,org.apache.dubbo.metadata.annotation.processing.model.Color>",
                "java.lang.String",
                "org.apache.dubbo.metadata.annotation.processing.model.Color",
                builder);

        buildAndAssertTypeDefinition(
                processingEnv,
                primitiveTypeModelsField,
                "java.util.NavigableMap<org.apache.dubbo.metadata.annotation.processing.model.Color,org.apache.dubbo.metadata.annotation.processing.model.PrimitiveTypeModel>",
                "org.apache.dubbo.metadata.annotation.processing.model.Color",
                "org.apache.dubbo.metadata.annotation.processing.model.PrimitiveTypeModel",
                builder);

        buildAndAssertTypeDefinition(
                processingEnv,
                modelsField,
                "java.util.HashMap<java.lang.String,org.apache.dubbo.metadata.annotation.processing.model.Model>",
                "java.lang.String",
                "org.apache.dubbo.metadata.annotation.processing.model.Model",
                builder);

        buildAndAssertTypeDefinition(
                processingEnv,
                modelArraysField,
                "java.util.TreeMap<org.apache.dubbo.metadata.annotation.processing.model.PrimitiveTypeModel,org.apache.dubbo.metadata.annotation.processing.model.Model[]>",
                "org.apache.dubbo.metadata.annotation.processing.model.PrimitiveTypeModel",
                "org.apache.dubbo.metadata.annotation.processing.model.Model[]",
                builder);
    }