### Question:
BeanPath extends SimpleExpression<T> implements Path<T> { @SuppressWarnings({ "unchecked", "rawtypes" }) public BooleanExpression instanceOfAny(Class... types) { BooleanExpression[] exprs = new BooleanExpression[types.length]; for (int i = 0; i < types.length; i++) { exprs[i] = this.instanceOf(types[i]); } return Expressions.anyOf(exprs); } BeanPath(Class<? extends T> type, String variable);  BeanPath(Class<? extends T> type, Path<?> parent,  String property);  BeanPath(Class<? extends T> type, PathMetadata metadata);  BeanPath(Class<? extends T> type, PathMetadata metadata, @Nullable PathInits inits); @Override final R accept(Visitor<R,C> v, C context); @SuppressWarnings("unchecked") U as(Class<U> clazz); @Override PathMetadata getMetadata(); @Override Path<?> getRoot(); BooleanExpression instanceOf(Class<B> type); @SuppressWarnings({ "unchecked", "rawtypes" }) BooleanExpression instanceOfAny(Class... types); @Override AnnotatedElement getAnnotatedElement();  }### Answer:
@Test public void instanceOfAny() { BooleanExpression pred1 = beanPath.instanceOf(BeanPathTest.class).or(beanPath.instanceOf(SubClass.class)); BooleanExpression pred2 = beanPath.instanceOfAny(BeanPathTest.class, SubClass.class); assertEquals(pred1, pred2); assertEquals("p instanceof class com.querydsl.core.types.dsl.BeanPathTest || " + "p instanceof class com.querydsl.core.types.dsl.BeanPathTest$SubClass", pred2.toString()); }