Gov. Jerry Brown signed legislation Monday that will allow underage college students to sip — but not swallow — alcohol as part of their coursework in winemaking and brewing programs.

The legislation, sponsored by Assemblyman Wesley Chesbro, D-Arcata, would allow students under age 21 to sip and then spit alcohol provided they are majoring in enology or brewing science programs. Twelve other states have similar laws that allow underage students to test their work, including Washington and Oregon.

“When it comes to brewing, we’re equally fortunate in California to have such a robust array of beer makers — both large and small,” Chesbro said in a statement. “In both instances, these products are made with the help of California college and university graduates who in many cases diligently complete the bulk of their career training in beer or wine production prior to reaching the age of 21.”

The University of California and California State University systems supported the legislation along with industry groups such as the California Association of Winegrape Growers and the California Craft Brewers Association.