sjyang18 commented on a change in pull request #4746:
URL: https://github.com/apache/nifi/pull/4746#discussion_r556778545



##########
File path: 
nifi-commons/nifi-expression-language/src/test/java/org/apache/nifi/attribute/expression/language/TestStandardPreparedQuery.java
##########
@@ -309,6 +309,18 @@ public void testVariableImpacted() {
         
assertTrue(Query.prepare("${anyMatchingAttribute('a.*'):equals('hello')}").getVariableImpact().isImpacted("attr"));
     }
 
+    @Test
+    public void testIsExpressionLanguagePresent() {
+        assertFalse(Query.prepare("value").isExpressionLanguagePresent());
+        assertFalse(Query.prepare("").isExpressionLanguagePresent());
+

Review comment:
       I would suggest to add the following additional test statements: 
   
          assertFalse(Query.prepare("${}").isExpressionLanguagePresent());
           assertFalse(Query.prepare("#{}").isExpressionLanguagePresent());
   
           assertTrue(Query.prepare("${${xx}}").isExpressionLanguagePresent());
           
assertTrue(Query.prepare("${audience}${comma}${question}").isExpressionLanguagePresent());
           assertTrue(Query.prepare("#{param}").isExpressionLanguagePresent());
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to