### Question:
DbStore implements Store, UserAddressStore { @Override public void delete(int userId) { try (Connection con = SOURCE.getConnection(); PreparedStatement st = con.prepareStatement( PROPS.getProperty("deleteUser") )) { st.setInt(1, userId); st.execute(); } catch (SQLException e) { LOG.error(e.getMessage(), e); } } private  DbStore(); static DbStore getInstance(); @Override User findByLogin(String login); @Override void add(User user); @Override void update(User newUser); @Override void delete(int userId); @Override List<User> findAll(); @Override User findById(int id); List<String> findAllCountries(); List<String> findCitiesByCountry(String name);  }### Answer:
@Test public void delete() throws SQLException { int userId = 0; try (Statement st = this.connect.createStatement()) { st.execute("INSERT INTO users (name, login, email) VALUES ('test', 'test', 'test')"); try (ResultSet rstSet = st.executeQuery("SELECT id FROM users WHERE name = 'test'")) { rstSet.next(); userId = rstSet.getInt("id"); } this.testStore.delete(userId); try (ResultSet rstSet = st.executeQuery("SELECT * FROM users WHERE name = 'test'")) { assertThat(rstSet.next(), is(false)); } } }