### Question:
QTuple extends FactoryExpressionBase<Tuple> { @Override public Tuple newInstance(Object... a) { return new TupleImpl(a); } protected  QTuple(Expression<?>... args); protected  QTuple(ImmutableList<Expression<?>> args); protected  QTuple(Expression<?>[]... args); @Override Tuple newInstance(Object... a); @Override R accept(Visitor<R,C> v, C context); @Override boolean equals(Object obj); @Override List<Expression<?>> getArgs();  }### Answer:
@Test public void alias() { Expression<?> expr = str1.as("s"); QTuple qTuple = new QTuple(expr); Tuple tuple = qTuple.newInstance("arg"); assertEquals("arg", tuple.get(expr)); assertEquals("arg", tuple.get(Expressions.stringPath("s"))); }
@Test public void nestedProjection_newInstance() { QTuple expr = new QTuple(concat); assertEquals("1234", FactoryExpressionUtils.wrap(expr).newInstance("12", "34").get(concat)); }
@Test public void nestedProjection_newInstance2() { QTuple expr = new QTuple(str1, str2, concat); assertEquals("1234", FactoryExpressionUtils.wrap(expr).newInstance("1", "2", "12", "34").get(concat)); }
@Test public void tuple_equals() { QTuple expr = new QTuple(str1, str2); assertEquals(expr.newInstance("str1", "str2"), expr.newInstance("str1", "str2")); }
@Test public void tuple_hashCode() { QTuple expr = new QTuple(str1, str2); assertEquals(expr.newInstance("str1", "str2").hashCode(), expr.newInstance("str1", "str2").hashCode()); }
@Test public void newInstance() { assertNotNull(new QTuple(str1, str1).newInstance(null, null)); assertNull(new QTuple(str1, str1).skipNulls().newInstance(null, null)); }