### Question:
VavrTupleRowMapperFactory implements RowMapperFactory { @Override public Optional<RowMapper<?>> build(Type type, ConfigRegistry config) { Class<?> erasedType = getErasedType(type); boolean emptyTupleType = Tuple0.class.equals(erasedType) || Tuple.class.equals(erasedType); boolean mappableTupleType = type instanceof ParameterizedType && Tuple.class.isAssignableFrom(erasedType); if (mappableTupleType && !emptyTupleType) { Class<? extends Tuple> tupleClass = (Class<? extends Tuple>) erasedType; Array<Tuple2<Type, Integer>> tupleTypes = Array.of(tupleClass.getTypeParameters()) .map(tp -> resolveType(tp, type)) .zipWithIndex((t, i) -> Tuple.of(t, i + 1)); Array<Tuple3<Type, Integer, Option<String>>> withConfiguredColumnName; if (Tuple2.class.equals(erasedType)) { withConfiguredColumnName = resolveKeyValueColumns(config, tupleTypes); } else { withConfiguredColumnName = tupleTypes .map(t -> Tuple.of(t._1, t._2, getConfiguredColumnName(t._2, config))); } boolean anyColumnSet = withConfiguredColumnName.map(t -> t._3).exists(Option::isDefined); if (anyColumnSet) { Array<Optional<RowMapper<?>>> mappers = withConfiguredColumnName .map(t -> t._3.isDefined() ? getColumnMapperForDefinedColumn(t._1, t._3.get(), config) : getRowMapper(t._1, config)); boolean mappableWithConfigured = mappers.forAll(Optional::isPresent); if (mappableWithConfigured) { return buildMapper(tupleClass, mappers); } Array<String> configuredColumns = withConfiguredColumnName .map(t -> t._2 + ": " + t._3.getOrNull()); throw new NoSuchMapperException(type + " cannot be mapped. " + "If tuple columns are configured (TupleMappers config class), " + "each tuple entry must be mappable via " + "specified column name or existing RowMapper. " + "Currently configured: " + configuredColumns.mkString(", ")); } else { Array<Optional<RowMapper<?>>> colMappers = tupleTypes .map(t -> getColumnMapper(t._1, t._2, config)); boolean mappableByColumn = colMappers.forAll(Optional::isPresent); if (mappableByColumn) { return buildMapper(tupleClass, colMappers); } Array<Optional<RowMapper<?>>> rowMappers = tupleTypes .map(t -> getRowMapper(t._1, config)); boolean mappableByRowMappers = rowMappers.forAll(Optional::isPresent); if (mappableByRowMappers) { return buildMapper(tupleClass, rowMappers); } throw new NoSuchMapperException(type + " cannot be mapped. " + "All tuple elements must be mappable by ColumnMapper or all by RowMapper. " + "If you want to mix column- and rowmapped entries, you must configure " + "columns via TupleMappers config class"); } } return Optional.empty(); }  @Override Optional<RowMapper<?>> build(Type type, ConfigRegistry config);  }### Answer:
@Test public void testBuildRowMapperForUntypedTupleShouldFail() { assertThat(unit.build(Tuple.class, null)).isEmpty(); }
@Test public void testBuildRowMapperForTuple0ShouldFail() { assertThat(unit.build(Tuple0.class, null)).isEmpty(); }