### Question:
LocalDateTimeMapper extends TypedMapper<LocalDateTime> { @Override protected LocalDateTime extractByName(final ResultSet r, final String name) throws SQLException { final Timestamp timestamp = r.getTimestamp(name); if (timestamp == null) { return null; } return timestamp.toLocalDateTime(); }    }### Answer:
@Test public void extractByName() throws Exception { when(resultSet.getTimestamp("name")).thenReturn(Timestamp.valueOf("2007-12-03 10:15:30.375")); LocalDateTime actual = new LocalDateTimeMapper().extractByName(resultSet, "name"); assertThat(actual).isEqualTo(LocalDateTime.parse("2007-12-03T10:15:30.375")); }
@Test public void extractByName_TimestampIsNull() throws Exception { when(resultSet.getTimestamp("name")).thenReturn(null); LocalDateTime actual = new LocalDateTimeMapper().extractByName(resultSet, "name"); assertThat(actual).isNull(); }