Test analysis: A, hydrocarbons contain only two elements, C and H; B, the carbon-oxygen double bonds in carboxyl and ester groups cannot react with hydrogen, and 1 mol rosmarinic acid can react with 7 mol of hydrogen at most; In item C, the substance contains 4 phenolic hydroxyl groups, 1 carboxyl group and 1 ester group, so it consumes 6 moles of NaOH. D, hydrolysis reaction with ester group, addition reaction with carbon-carbon double bond and esterification reaction with carboxyl group can occur.