### Question:
Expression implements Serializable, XMLSerializable { public Expression orExp(Expression exp) { return joinExp(Expression.OR, exp); }  abstract Map<String, String> getPathAliases(); String expName(); @Override boolean equals(Object object); @Override int hashCode(); int getType(); void setType(int type); Expression paramsArray(Object... parameters); Expression params(Map<String, ?> parameters); Expression params(Map<String, ?> parameters, boolean pruneMissing); Expression joinExp(int type, Expression exp); Expression joinExp(int type, Expression exp, Expression... expressions); Expression andExp(Expression exp); Expression andExp(Expression exp, Expression... expressions); Expression orExp(Expression exp); Expression orExp(Expression exp, Expression... expressions); abstract Expression notExp(); abstract int getOperandCount(); abstract Object getOperand(int index); abstract void setOperand(int index, Object value); abstract Object evaluate(Object o); boolean match(Object o); T first(List<T> objects); @SuppressWarnings("unchecked") List<T> filterObjects(Collection<T> objects); Collection<?> filter(Collection<T> source, Collection<T> target); Expression deepCopy(); abstract Expression shallowCopy(); void traverse(TraversalHandler visitor); Expression transform(Function<Object, Object> transformer); @Override void encodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate); abstract void appendAsString(Appendable out); void appendAsEJBQL(Appendable out, String rootId); abstract void appendAsEJBQL(List<Object> parameterAccumulator, Appendable out, String rootId); @Override String toString(); String toEJBQL(List<Object> parameterAccumulator, String rootId); String toEJBQL(String rootId); final static Object PRUNED_NODE; static final int AND; static final int OR; static final int NOT; static final int EQUAL_TO; static final int NOT_EQUAL_TO; static final int LESS_THAN; static final int GREATER_THAN; static final int LESS_THAN_EQUAL_TO; static final int GREATER_THAN_EQUAL_TO; static final int BETWEEN; static final int IN; static final int LIKE; static final int LIKE_IGNORE_CASE; static final int ADD; static final int SUBTRACT; static final int MULTIPLY; static final int DIVIDE; static final int NEGATIVE; static final int TRUE; static final int FALSE; static final int OBJ_PATH; static final int DB_PATH; static final int LIST; static final int NOT_BETWEEN; static final int NOT_IN; static final int NOT_LIKE; static final int NOT_LIKE_IGNORE_CASE; static final int BITWISE_NOT; static final int BITWISE_AND; static final int BITWISE_OR; static final int BITWISE_XOR; static final int BITWISE_LEFT_SHIFT; static final int BITWISE_RIGHT_SHIFT; static final int FUNCTION_CALL; static final int ASTERISK; static final int FULL_OBJECT; static final int ENCLOSING_OBJECT; static final int EXISTS; static final int NOT_EXISTS; static final int SUBQUERY; static final int DBID_PATH; static final int CUSTOM_OP; }### Answer:
@Test public void testOrExp() { Expression e1 = ExpressionFactory.matchExp("name", "Picasso"); Expression e2 = ExpressionFactory.matchExp("age", 30); Expression exp = e1.orExp(e2); assertEquals(exp.getType(), Expression.OR); assertEquals(2, ((SimpleNode) exp).jjtGetNumChildren()); }