### Question:
UnknownTypeHandler extends BaseTypeHandler<Object> { @Override public void setNonNullParameter(PreparedStatement ps, int i, Object parameter, JdbcType jdbcType) throws SQLException { TypeHandler handler = resolveTypeHandler(parameter, jdbcType); handler.setParameter(ps, i, parameter, jdbcType); } UnknownTypeHandler(Configuration configuration); @Deprecated  UnknownTypeHandler(TypeHandlerRegistry typeHandlerRegistry); @Override void setNonNullParameter(PreparedStatement ps, int i, Object parameter, JdbcType jdbcType); @Override Object getNullableResult(ResultSet rs, String columnName); @Override Object getNullableResult(ResultSet rs, int columnIndex); @Override Object getNullableResult(CallableStatement cs, int columnIndex);  }### Answer:
@Test void setParameterWithNonNullParameterThrowsException() throws SQLException { doThrow(new SQLException("invalid column")).when((UnknownTypeHandler) TYPE_HANDLER).setNonNullParameter(ps, 1, 99, JdbcType.INTEGER); try { TYPE_HANDLER.setParameter(ps, 1, 99, JdbcType.INTEGER); Assertions.fail("Should have thrown a TypeException"); } catch (Exception e) { Assertions.assertTrue(e instanceof TypeException, "Expected TypedException"); Assertions.assertTrue(e.getMessage().contains("parameter #1"), "Parameter index is in exception"); } }