GlacierStorageProvider extends S3StorageProvider { @Override public void setContentProperties(String spaceId, String contentId, Map<String, String> contentProperties) { log.debug("setContentProperties(" + spaceId + ", " + contentId + ")"); try { super.setContentProperties(spaceId, contentId, contentProperties); } catch (StorageException e) { checkStorageState(e); throw e; } } GlacierStorageProvider(String accessKey, String secretKey, Map<String, String> options);  GlacierStorageProvider(String accessKey, String secretKey);  GlacierStorageProvider(AmazonS3 s3Client, String accessKey); @Override StorageProviderType getStorageProviderType(); @Override String copyContent(String sourceSpaceId,
                              String sourceContentId,
                              String destSpaceId,
                              String destContentId); @Override RetrievedContent getContent(String spaceId, String contentId, String range); @Override void setContentProperties(String spaceId,
                                     String contentId,
                                     Map<String, String> contentProperties);  }
@Test public void testSetContentPropertiesFail() { setListBucketsMock(); ObjectMetadata objMeta = new ObjectMetadata(); objMeta.setUserMetadata(new HashMap<String, String>()); EasyMock.expect(s3Client.getObjectMetadata(accessKey + "." + spaceId, contentId)) .andReturn(objMeta) .times(2); EasyMock.expect( s3Client.getObjectAcl(accessKey + "." + spaceId, contentId)) .andReturn(new AccessControlList()); EasyMock.expect( s3Client.copyObject(EasyMock.isA(CopyObjectRequest.class))) .andThrow(glacierEx); EasyMock.replay(s3Client); GlacierStorageProvider provider = new GlacierStorageProvider(s3Client, accessKey); try { Map<String, String> props = new HashMap<>(); provider.setContentProperties(spaceId, contentId, props); fail("StorageStateException expected"); } catch (StorageStateException expected) { assertNotNull(expected.getMessage()); } }