@Override
  public UpdateResponse delete(Long key)
  {
    final boolean isRemoved = (_db.getData().remove(key) != null);

    // Remove this photo from all albums to maintain referential integrity.
    AlbumEntryResource.purge(_entryDb, null, key);

    return new UpdateResponse(isRemoved ? HttpStatus.S_204_NO_CONTENT
        : HttpStatus.S_404_NOT_FOUND);
  }
@Test
  public void testResourceDelete()
  {
    final Long id = createPhoto();

    // validate response status code
    final UpdateResponse uResp = _res.delete(id);
    Assert.assertEquals(uResp.getStatus(), HttpStatus.S_204_NO_CONTENT);
  }