def METHOD_NAME(self):
    """Test if RegexDetector returns only non empty matches"""
    entity_name = 'test'
    _ = '__{}__'.format(entity_name)
    pattern = '\\b(\\d+|)\\b'
    text = 'there are no numbers in this text! but the pattern is bad too, it matches empty string'
    regex_detector = RegexDetector(entity_name=entity_name, pattern=pattern)
    expected_values = []
    expected_original_texts = []
    expected_tagged_text = text
    values, original_texts = regex_detector.detect_entity(text)
    self.assertEqual(regex_detector.tagged_text, expected_tagged_text)
    self.assertEqual(values, expected_values)
    self.assertEqual(original_texts, expected_original_texts)