@Test public void metadataException() throws IOException { Map<String, Object> metadata = new HashMap<>(); when(item.getMetadata()).thenReturn(metadata); when(item.getContentType()).thenReturn("image/png"); when(item.getData()).thenThrow(new IOException()); processor.afterSave(item); }
@Override public void afterSave(StorageItem item) { if (item != null) { StorageItemMetadataCache.update(item); } }
MetadataAfterSave implements StorageItemAfterSave { @Override public void afterSave(StorageItem item) { if (item != null) { StorageItemMetadataCache.update(item); } } }
MetadataAfterSave implements StorageItemAfterSave { @Override public void afterSave(StorageItem item) { if (item != null) { StorageItemMetadataCache.update(item); } }  }
MetadataAfterSave implements StorageItemAfterSave { @Override public void afterSave(StorageItem item) { if (item != null) { StorageItemMetadataCache.update(item); } }  @Override void afterSave(StorageItem item); }
MetadataAfterSave implements StorageItemAfterSave { @Override public void afterSave(StorageItem item) { if (item != null) { StorageItemMetadataCache.update(item); } }  @Override void afterSave(StorageItem item);  }