public Struct(Schema schema) {
        if (schema.type() != Schema.Type.STRUCT)
            throw new DataException("Not a struct schema: " + schema);
        this.schema = schema;
        this.values = new Object[schema.fields().size()];
    }
@Test
    public void testValidateStructWithNullValue() {
        Schema schema = SchemaBuilder.struct()
                .field("one", Schema.STRING_SCHEMA)
                .field("two", Schema.STRING_SCHEMA)
                .field("three", Schema.STRING_SCHEMA)
                .build();

        Struct struct = new Struct(schema);
        Exception e = assertThrows(DataException.class, struct::validate);
        assertEquals("Invalid value: null used for required field: \"one\", schema type: STRING",
            e.getMessage());
    }