Energy consumption is one of the most critical protocol properties in a wireless sensor network. Therefore, a precise energy model is required for the evaluation of protocols. In addition to evaluation, an energy model can also be used for on-line energy accounting. After processing user queries, nodes aware of the energy model can send an energy bill towards the network's sink. This allows the user to adjust future queries to be more energy efficient. The contribution of this paper is twofold: First, a theoretical energy model based on simple finite automata is presented. This model can be used for on-line accounting, simulation and generation of a-priori knowledge. Second, the proposed theoretical model is backed up by practical measurements using a new measurement device called SNMD that also offers management functions for sensor-net testbeds. Therewith, output of the theoretical model can be compared to and justified by real-world measurements.