Genetic test predicts middle-aged obesity risk