### Question:
RoleStore { public boolean update(int id, Role role) { boolean done = false; try (Connection connect = CON.getConnect(); PreparedStatement st = connect.prepareStatement(QUERIES.getProperty("updateRole"))) { st.setString(1, role.getRole()); st.setInt(2, id); done = st.executeUpdate() > 0; } catch (SQLException e) { LOG.error(e.getMessage(), e); } return done; }  int add(Role role); List<Role> findAll(); Role findById(int id); boolean delete(int id); boolean update(int id, Role role); int findRoleId(Role role); List<User> findUsersByRole(Role role);  }### Answer:
@Test public void update() { Role role = new Role("test"); Role uppedRole = new Role("test2"); this.testStore.add(role); int roleId = this.findRoleId(role); assertTrue(this.testStore.update(roleId, uppedRole)); assertFalse(this.testStore.update(0, new Role("test3"))); assertTrue(this.testStore.findById(roleId).equals(uppedRole)); assertFalse(this.testStore.findAll().contains(role)); }