@Test
public void testDeleteMapping() throws Exception {

  StoragePath path = new StoragePath(ORG, MP_ID, new VersionImpl(1L), ASSET1_ID);
  database.storeMapping(path, "archive_path/" + ASSET1_ID, AWS_VERSION_1);
  AwsAssetMapping mapping = database.findMapping(path);
  Assert.assertNotNull(mapping);
  database.deleteMapping(path);
  // Mapping row is not deleted, but findMapping should not find it
  mapping = database.findMapping(path);
  Assert.assertNull(mapping);
  // Mapping should have its deletion date set
  List<AwsAssetMapping> mappings = database.findAllByMediaPackage(MP_ID);
  Assert.assertEquals(1, mappings.size());
  Assert.assertNotNull(mappings.get(0).getDeletionDate());
}