NaN when there is no measurement

- Add tests
Move properties and `@Before` method to the top.