PmExpressionApi { public static Object findByExpression(PmObject pm, String expression) { return apiHandler.findByExpression(pm, expression); }  static Object findByExpression(PmObject pm, String expression); static Object getByExpression(PmObject pm, String expression); @SuppressWarnings("unchecked") static T findByExpression(PmObject pm, String expression, Class<T> resultType); static T getByExpression(PmObject pm, String propName, Class<T> propType); static Object findNamedObject(PmObject pm, String objName); static SyntaxVersion getSyntaxVersion(PmObject pm);  }
@Test public void testOptionalExpr() { assertEquals(null, PmExpressionApi.findByExpression(testPm, "s.(o)pmTooltip.andSomethingThatDoesntExistCantBeDetectedAfterANullValue")); }
@Test public void testExistsOptionallyExpr() { assertEquals(null, PmExpressionApi.findByExpression(testPm, "s.(x)somethingThatDoesntExist")); assertEquals(null, PmExpressionApi.findByExpression(testPm, "s.(x,o)somethingThatDoesntExist")); }