Add tests, make minimum test interval configurable, use os:timestamp/0 instead of now/0