Replace duplicated data specs code with mixins.