Factor common code from EntityTypesController tests

...and tweak let!() to let() in MeasurementTypesController tests