Added tests for get_occurrence method