Add a test and spec for nextOccurences invalid args