### Question:
JdbcUtils { public static Optional<Class<?>> getColumnClass(ResultSetMetaData metaData, int column) throws SQLException { String className = metaData.getColumnClassName(column); try { Class<?> clazz = Class.forName(className); return Optional.of(clazz); } catch (ClassNotFoundException e) { return Optional.empty(); } }  static Optional<Class<?>> getColumnClass(ResultSetMetaData metaData, int column);  }### Answer:
@Test public void testGetColumnClass() throws SQLException { String notExistingClassName = "foo.bar.MyClass"; doReturn(String.class.getName()).when(metaData).getColumnClassName(0); doReturn(notExistingClassName).when(metaData).getColumnClassName(1); assertThat(JdbcUtils.getColumnClass(metaData, 0)).hasValue(String.class); assertThat(JdbcUtils.getColumnClass(metaData, 1)).isEmpty(); }