Github user trkurc commented on the pull request:
https://github.com/apache/nifi/pull/116#issuecomment-157213254
@jskora what would you expect the following unit tests to do?
```
@Test
public void testInvalidRegex() {
final TestRunner runner = TestRunners.newTestRunner(new
UpdateAttribute());
runner.setProperty("Delete Attributes Expression", "(");
final Map<String, String> attributes = new HashMap<>();
attributes.put("attribute.1", "value.1");
runner.enqueue(new byte[0], attributes);
runner.run();
}
@Test
public void testInvalidRegexInAttribute() {
final TestRunner runner = TestRunners.newTestRunner(new
UpdateAttribute());
runner.setProperty("Delete Attributes Expression", "${butter}");
final Map<String, String> attributes = new HashMap<>();
attributes.put("butter", "(");
runner.enqueue(new byte[0], attributes);
runner.run();
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---