Test beam measurements of the CMS High Granularity Calorimeter