ExpressionConditionUtils { public static boolean isNowExpression(final ExpressionSegment segment) { return segment instanceof ComplexExpressionSegment && "now()".equalsIgnoreCase(((ComplexExpressionSegment) segment).getText()); }  static boolean isNowExpression(final ExpressionSegment segment); static boolean isNullExpression(final ExpressionSegment segment);  }
@Test public void assertIsNowExpression() { assertFalse(ExpressionConditionUtils.isNowExpression(new LiteralExpressionSegment(0, 0, new Object()))); assertFalse(ExpressionConditionUtils.isNowExpression(new CommonExpressionSegment(0, 0, "shardingsphere"))); assertTrue(ExpressionConditionUtils.isNowExpression(new CommonExpressionSegment(0, 0, "NOW()"))); }