DefaultBucket implements Bucket { @Override @NotNull public String name() { return this.domain.name(); } DefaultBucket(@NotNull final Domain dmn); @Override @NotNull @Cacheable(lifetime = Tv.TEN, unit = TimeUnit.MINUTES) AmazonS3 client(); @Override String toString(); @Override @NotNull String name(); @Override @NotNull String key(); @Override @NotNull String secret(); @Override @NotNull String bucket(); @Override @NotNull String region(); @Override String syslog();  }
@Test public void reproducesPropertiesOfDomain() throws Exception { final Domain domain = new DomainMocker().mock(); MatcherAssert.assertThat( new DefaultBucket(domain).name(), Matchers.equalTo(domain.name()) ); }