### Question:
MusicTypeStore { public boolean update(int id, MusicType type) { boolean result = false; if (type != null) { try (Connection connect = CON.getConnect(); PreparedStatement st = connect.prepareStatement(QUERIES.getProperty("updateType"))) { st.setString(1, type.getType()); st.setInt(2, id); result = st.executeUpdate() > 0; } catch (SQLException e) { LOG.error(e.getMessage(), e); } } return result; }  int add(MusicType type); int findTypeId(MusicType type); List<MusicType> findAll(); MusicType findById(int id); boolean delete(int id); boolean update(int id, MusicType type);  }### Answer:
@Test public void update() { this.testStore.add(new MusicType("test6")); int id = this.findIdByType(new MusicType("test6")); assertTrue(this.testStore.update(id, new MusicType("test7"))); assertFalse(this.testStore.update(id, null)); assertFalse(this.testStore.update(0, new MusicType("test6"))); assertThat(this.testStore.findById(id).getType(), is("test7")); }