Unit tests for arbitrary intervals

Added a range of unit tests for the arbitrary intervals functionality.