### Question:
CachedSpawnDataStore implements SpawnDataStore { @Override public void deleteChild(String parent, String childId) { dataStore.deleteChild(parent, childId); cache.invalidate(ImmutablePair.of(parent, childId)); } CachedSpawnDataStore(SpawnDataStore dataStore, long dataStoreCacheSize); @Override String getDescription(); @Override String get(String path); @Override Map<String, String> get(String[] paths); @Override void put(String path, String value); @Override void putAsChild(String parent, String childId, String value); @Override String getChild(String parent, String childId); @Override void deleteChild(String parent, String childId); @Override void delete(String path); @Override List<String> getChildrenNames(String path); @Override Map<String, String> getAllChildren(String path); @Override void close();  }### Answer:
@Test public void testDeleteChild() throws SQLException { final PreparedStatement deletePreparedStatement = Mockito.mock(PreparedStatement.class); Mockito.doReturn(deletePreparedStatement).when(connection).prepareStatement(Mockito.startsWith("DELETE FROM ")); cachedDataStore.deleteChild("key", "childId"); Mockito.verify(deletePreparedStatement, Mockito.atLeastOnce()).execute(); Mockito.verify(deletePreparedStatement).setString(Mockito.eq(1), Mockito.eq("key")); Mockito.verify(deletePreparedStatement).setString(Mockito.eq(2), Mockito.eq("childId")); }