@Test
public void testBuild() {

    buildAndAssertTypeDefinition(processingEnv, integersField, "int[]", "int", builder);
    buildAndAssertTypeDefinition(processingEnv, stringsField, "java.lang.String[]", "java.lang.String", builder);
    buildAndAssertTypeDefinition(processingEnv, primitiveTypeModelsField,
            "org.apache.dubbo.metadata.annotation.processing.model.PrimitiveTypeModel[]",
            "org.apache.dubbo.metadata.annotation.processing.model.PrimitiveTypeModel", builder);
    buildAndAssertTypeDefinition(processingEnv, modelsField,
            "org.apache.dubbo.metadata.annotation.processing.model.Model[]",
            "org.apache.dubbo.metadata.annotation.processing.model.Model", builder, (def, subDef) -> {
                TypeElement subType = elements.getTypeElement(subDef.getType());
                assertEquals(ElementKind.CLASS, subType.getKind());
            });
    buildAndAssertTypeDefinition(processingEnv, colorsField,
            "org.apache.dubbo.metadata.annotation.processing.model.Color[]",
            "org.apache.dubbo.metadata.annotation.processing.model.Color", builder, (def, subDef) -> {
                TypeElement subType = elements.getTypeElement(subDef.getType());
                assertEquals(ElementKind.ENUM, subType.getKind());
            });
}