Add self test for energy with rr integration