People have been warned constantly about the bad effects of eating junk food. But now might be the best time to take these warnings seriously as a new study suggests that junk food may cause damage to the kidneys in the same way as type 2 diabetes.

Type 2 diabetes is often associated with obesity, and it happens when the body doesn't produce enough insulin or resist insulin. Sugar (glucose) is then accumulated in the blood, which can severely affect organs, such as kidneys, therefore causing diabetic kidney disease.

In the study, which was published in the Experimental Physiology journal, researchers used rats to test how insulin resistance and too much sugar or fat affect the kidney.

Rats were fed junk foods like chocolate bars, marshmallows, biscuits and cheese for eight weeks. Other rats were given rodent chow containing 60% fat for five weeks. The researchers analyzed the rats' blood sugar levels and the different glucose transporters in the kidneys.

Havovi Chichger, senior lecturer in Biomedical Science at the Anglia Ruskin University in the UK and lead author of the study, said in a news release that both groups experienced "very similar" negative effects and increases in blood sugar levels.

"The Western diet contains more and more processed junk food and fat, and there is a well-established link between excessive consumption of this type of food and recent increases in the prevalence of obesity and type 2 diabetes," Chichger said. "In our study, type 1 and type 2 diabetes both induce changes in glucose transport in the kidney, but junk food or a diet high in fat causes changes that are very similar to those found in type 2 diabetes."

The study, however, was countered by Dr. David Katz, director of the Yale University Prevention Research Center, saying that the results of the study cannot be generalized with humans as the researchers used rats instead of people and the study itself was small.

"Animal research is most meaningful when interpreted in the overall context of established evidence," Katz said in a report published in Time. "In this case, we certainly already knew that junk food is not good for us. So this is not a great surprise."

There are other known studies suggesting that junk foods can do more danger than just making people fat. A 2015 study suggests that eating junk foods promotes problems like inflammation and high blood pressure. Another study found that diets high in added sugar and refined grains were associated with higher risks for depression.