### Question:
OptionDAO { public boolean exist(String optionKey) { TransactionalDataSource dataSource = databaseManager.getDataSource(); try (Connection con = dataSource.getConnection()) { PreparedStatement stmt = con.prepareStatement("SELECT count(*) FROM option WHERE name = ?"); stmt.setString(1, optionKey); try (ResultSet rs = stmt.executeQuery()) { if (rs.next()) { return rs.getLong(1) > 0; } } } catch (SQLException e) { log.error(e.getMessage()); } return false; } @Inject  OptionDAO(DatabaseManager databaseManager); String get(String optionName); boolean set(String optionName, String optionValue); boolean delete(String optionName); void deleteAll(); boolean exist(String optionKey);  }### Answer:
@Test void exist() { boolean exists = optionDAO.exist("unknown_key_1"); assertFalse(exists); exists = optionDAO.exist("existingKey"); assertTrue(exists); exists = optionDAO.exist("existingNullKey"); assertTrue(exists); exists = optionDAO.exist("existingEmptyKey"); assertTrue(exists); }