Added the needed implementation for unit-testing the receiving energy part