S3ChangeLogStore implements ChangeLogStore { AmazonS3 getS3Client() { if (StringUtil.isEmpty(awsRegion)) { throw new RuntimeException("S3ChangeLogStore: Couldn't detect AWS region"); } return AmazonS3ClientBuilder.standard() .withRegion(awsRegion) .build(); } S3ChangeLogStore();  S3ChangeLogStore(String awsRegion); @Override boolean supportsFullRefresh(); @Override SignedDomain getLocalSignedDomain(String domainName); @SuppressWarnings("EmptyMethod") @Override void removeLocalDomain(String domainName); @SuppressWarnings("EmptyMethod") @Override void saveLocalDomain(String domainName, SignedDomain signedDomain); @Override List<String> getLocalDomainList(); boolean getAllSignedDomains(List<String> domains); @Override Set<String> getServerDomainList(); @Override SignedDomains getServerDomainModifiedList(); @Override SignedDomain getServerSignedDomain(String domainName); @Override SignedDomains getUpdatedSignedDomains(StringBuilder lastModTimeBuffer); @Override void setLastModificationTimestamp(String newLastModTime); ExecutorService getExecutorService();  }
@Test public void testGetS3Client() { S3ChangeLogStore store = new S3ChangeLogStore(); AmazonS3 s3Client = store.getS3Client(); assertNotNull(s3Client); }
@Test public void initNoRegionException() { System.clearProperty(ZTS_PROP_AWS_REGION_NAME); S3ChangeLogStore store = new S3ChangeLogStore(null); try { store.getS3Client(); fail(); } catch (RuntimeException ex) { assertEquals(ex.getMessage(), "S3ChangeLogStore: Couldn't detect AWS region"); } }